Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
7a3977c0
Commit
7a3977c0
authored
May 08, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a couple of oversights in new ALTER TABLE code that broke
ALTER SET STATISTICS for functional indexes.
parent
c00b3099
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/backend/commands/tablecmds.c
src/backend/commands/tablecmds.c
+8
-5
No files found.
src/backend/commands/tablecmds.c
View file @
7a3977c0
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.10
6 2004/05/08 00:34:4
9 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.10
7 2004/05/08 22:46:2
9 tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -112,6 +112,7 @@ typedef struct AlteredTableInfo
{
/* Information saved before any work commences: */
Oid
relid
;
/* Relation to work on */
char
relkind
;
/* Its relkind */
TupleDesc
oldDesc
;
/* Pre-modification tuple descriptor */
/* Information saved by Phase 1 for Phase 2: */
List
*
subcmds
[
AT_NUM_PASSES
];
/* Lists of AlterTableCmd */
...
...
@@ -2011,9 +2012,10 @@ ATRewriteCatalogs(List **wqueue)
{
AlteredTableInfo
*
tab
=
(
AlteredTableInfo
*
)
lfirst
(
ltab
);
if
(
tab
->
subcmds
[
AT_PASS_ADD_COL
]
||
if
(
tab
->
relkind
==
RELKIND_RELATION
&&
(
tab
->
subcmds
[
AT_PASS_ADD_COL
]
||
tab
->
subcmds
[
AT_PASS_ALTER_TYPE
]
||
tab
->
subcmds
[
AT_PASS_COL_ATTRS
]
)
tab
->
subcmds
[
AT_PASS_COL_ATTRS
])
)
{
AlterTableCreateToastTable
(
tab
->
relid
,
true
);
}
...
...
@@ -2192,7 +2194,7 @@ ATRewriteTables(List **wqueue)
*/
reindex_relation
(
tab
->
relid
,
false
);
}
else
else
if
(
tab
->
constraints
!=
NIL
)
{
/*
* Test the current data within the table against new constraints
...
...
@@ -2486,6 +2488,7 @@ ATGetQueueEntry(List **wqueue, Relation rel)
*/
tab
=
(
AlteredTableInfo
*
)
palloc0
(
sizeof
(
AlteredTableInfo
));
tab
->
relid
=
relid
;
tab
->
relkind
=
rel
->
rd_rel
->
relkind
;
tab
->
oldDesc
=
CreateTupleDescCopy
(
RelationGetDescr
(
rel
));
*
wqueue
=
lappend
(
*
wqueue
,
tab
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment