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

Commitc672559

Browse files
committed
Fix adding columns to a temp table.
1 parentc0cd32d commitc672559

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎src/backend/commands/command.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.42 1999/03/30 01:37:22 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.43 1999/04/13 19:04:33 momjian Exp $
1111
*
1212
* NOTES
1313
* The PortalExecutorHeapMemory crap needs to be eliminated
@@ -38,6 +38,8 @@
3838
#include"utils/builtins.h"
3939
#include"utils/mcxt.h"
4040
#include"utils/portal.h"
41+
#include"utils/relcache.h"
42+
#include"utils/temprel.h"
4143
#include"utils/syscache.h"
4244
#include"miscadmin.h"
4345
#include"string.h"
@@ -500,6 +502,13 @@ PerformAddAttribute(char *relationName,
500502
((Form_pg_class)GETSTRUCT(reltup))->relnatts=maxatts;
501503
heap_replace(rel,&reltup->t_self,reltup,NULL);
502504

505+
{
506+
HeapTupletemptup;
507+
508+
if ((temptup=get_temp_rel_by_name(relationName))!=NULL)
509+
((Form_pg_class)GETSTRUCT(temptup))->relnatts=maxatts;
510+
}
511+
503512
/* keep catalog indices current */
504513
CatalogOpenIndices(Num_pg_class_indices,Name_pg_class_indices,ridescs);
505514
CatalogIndexInsert(ridescs,Num_pg_class_indices,rel,reltup);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp