Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8c43300

Browse files
committed
Make sure printtup() always sends the number of columns previously
advertised in RowDescription message. Depending on the physical tuple'scolumn count is not really correct, since according to heap_getattr()conventions the tuple may be short some columns, which will automaticallyget read as nulls. Problem has been latent since forever, but was onlyexposed by recent change to skip a projection step in SELECT * FROM...
1 parentb71a489 commit8c43300

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/backend/access/common/printtup.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.73 2003/05/13 18:39:50 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.74 2003/05/26 17:51:38 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -286,7 +286,7 @@ printtup(HeapTuple tuple, TupleDesc typeinfo, DestReceiver *self)
286286
{
287287
DR_printtup*myState= (DR_printtup*)self;
288288
StringInfoDatabuf;
289-
intnatts=tuple->t_data->t_natts;
289+
intnatts=typeinfo->natts;
290290
inti;
291291

292292
/* Set or update my derived attribute info, if needed */
@@ -370,7 +370,7 @@ printtup_20(HeapTuple tuple, TupleDesc typeinfo, DestReceiver *self)
370370
{
371371
DR_printtup*myState= (DR_printtup*)self;
372372
StringInfoDatabuf;
373-
intnatts=tuple->t_data->t_natts;
373+
intnatts=typeinfo->natts;
374374
inti,
375375
j,
376376
k;
@@ -517,7 +517,7 @@ debugStartup(DestReceiver *self, int operation, TupleDesc typeinfo)
517517
void
518518
debugtup(HeapTupletuple,TupleDesctypeinfo,DestReceiver*self)
519519
{
520-
intnatts=tuple->t_data->t_natts;
520+
intnatts=typeinfo->natts;
521521
inti;
522522
Datumorigattr,
523523
attr;
@@ -573,7 +573,7 @@ printtup_internal_20(HeapTuple tuple, TupleDesc typeinfo, DestReceiver *self)
573573
{
574574
DR_printtup*myState= (DR_printtup*)self;
575575
StringInfoDatabuf;
576-
intnatts=tuple->t_data->t_natts;
576+
intnatts=typeinfo->natts;
577577
inti,
578578
j,
579579
k;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp