aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/copy.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-09-02 01:05:06 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-09-02 01:05:06 +0000
commitc7a165adc64e3e67e0dcee4088d84a0638b3515a (patch)
tree97d02a63e6ab6a516cb8e8ba24b0ba42782d202d /src/backend/commands/copy.c
parentfcd34f9f7ff561213beef97f93c32f415e35a79c (diff)
downloadpostgresql-c7a165adc64e3e67e0dcee4088d84a0638b3515a.tar.gz
postgresql-c7a165adc64e3e67e0dcee4088d84a0638b3515a.zip
Code review for HeapTupleHeader changes. Add version number to page headers
(overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask, per earlier discussion. Simplify scheme for overlaying fields in tuple header (no need for cmax to live in more than one place). Don't try to clear infomask status bits in tqual.c --- not safe to do it there. Don't try to force output table of a SELECT INTO to have OIDs, either. Get rid of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which has already caused one recent failure. Improve documentation.
Diffstat (limited to 'src/backend/commands/copy.c')
-rw-r--r--src/backend/commands/copy.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 56d40c5bf0f..c8463ac8f86 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.169 2002/08/29 07:22:21 ishii Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.170 2002/09/02 01:05:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -597,10 +597,8 @@ CopyTo(Relation rel, List *attnumlist, bool binary, bool oids,
/* Send OID if wanted --- note fld_count doesn't include it */
if (oids)
{
- Oid oid;
-
- AssertTupleDescHasOid(tupDesc);
- oid = HeapTupleGetOid(tuple);
+ Oid oid = HeapTupleGetOid(tuple);
+
fld_size = sizeof(Oid);
CopySendData(&fld_size, sizeof(int16), fp);
CopySendData(&oid, sizeof(Oid), fp);
@@ -611,7 +609,6 @@ CopyTo(Relation rel, List *attnumlist, bool binary, bool oids,
/* Text format has no per-tuple header, but send OID if wanted */
if (oids)
{
- AssertTupleDescHasOid(tupDesc);
string = DatumGetCString(DirectFunctionCall1(oidout,
ObjectIdGetDatum(HeapTupleGetOid(tuple))));
CopySendString(string, fp);