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

Commit7431796

Browse files
committed
fix_parsetree_attnums was not nearly smart enough about walking parse
trees. Also rewrite find_all_inheritors() in a more intelligible style.
1 parent549a8ba commit7431796

File tree

4 files changed

+158
-139
lines changed

4 files changed

+158
-139
lines changed

‎src/backend/commands/command.c

Lines changed: 4 additions & 4 deletions
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.59 1999/12/10 03:55:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.60 1999/12/14 03:35:20 tgl Exp $
1111
*
1212
* NOTES
1313
* The PortalExecutorHeapMemory crap needs to be eliminated
@@ -340,12 +340,11 @@ PerformAddAttribute(char *relationName,
340340
{
341341
if (inherits)
342342
{
343-
Oidchildrelid;
344343
List*child,
345344
*children;
346345

347346
/* this routine is actually in the planner */
348-
children=find_all_inheritors(lconsi(myrelid,NIL),NIL);
347+
children=find_all_inheritors(myrelid);
349348

350349
/*
351350
* find_all_inheritors does the recursive search of the
@@ -354,7 +353,8 @@ PerformAddAttribute(char *relationName,
354353
*/
355354
foreach(child,children)
356355
{
357-
childrelid=lfirsti(child);
356+
Oidchildrelid=lfirsti(child);
357+
358358
if (childrelid==myrelid)
359359
continue;
360360
rel=heap_open(childrelid,AccessExclusiveLock);

‎src/backend/commands/rename.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.37 1999/11/25 00:15:57 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.38 1999/12/14 03:35:20 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -97,7 +97,7 @@ renameatt(char *relname,
9797
*children;
9898

9999
/* this routine is actually in the planner */
100-
children=find_all_inheritors(lconsi(relid,NIL),NIL);
100+
children=find_all_inheritors(relid);
101101

102102
/*
103103
* find_all_inheritors does the recursive search of the
@@ -106,10 +106,9 @@ renameatt(char *relname,
106106
*/
107107
foreach(child,children)
108108
{
109-
Oidchildrelid;
109+
Oidchildrelid=lfirsti(child);
110110
charchildname[NAMEDATALEN];
111111

112-
childrelid=lfirsti(child);
113112
if (childrelid==relid)
114113
continue;
115114
reltup=SearchSysCacheTuple(RELOID,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp