diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-02-07 21:08:04 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-02-07 21:08:04 +0000 |
commit | f6693948c4a16c8f2dbc2f36a5207b03f1438fd6 (patch) | |
tree | b1b58da75a45b748ab9623605c24a7672f07209b /src/backend/parser | |
parent | ed5858dff87b15e157398228d57b422bc705b220 (diff) |
Some variants of ALTER OWNER tried to make the "object" field of the
statement be a list of bare C strings, rather than String nodes, which is
what they need to be for copyfuncs/equalfuncs to work. Fortunately these
node types never go out to disk (if they did, we'd likely have noticed the
problem sooner), so we can just fix it without creating a need for initdb.
This bug has been there since 8.0, but 8.3 exposes it in a more common
code path (Parse messages) than prior releases did. Per bug #3940 from
Vladimir Kokovic.
Diffstat (limited to 'src/backend/parser')
-rw-r--r-- | src/backend/parser/gram.y | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index c90743a1017..59cfe0cfc31 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.568 2006/11/05 22:42:09 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.568.2.1 2008/02/07 21:08:04 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -4438,7 +4438,7 @@ AlterOwnerStmt: ALTER AGGREGATE func_name aggr_args OWNER TO RoleId { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_DATABASE; - n->object = list_make1($3); + n->object = list_make1(makeString($3)); n->newowner = $6; $$ = (Node *)n; } @@ -4481,7 +4481,7 @@ AlterOwnerStmt: ALTER AGGREGATE func_name aggr_args OWNER TO RoleId { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_SCHEMA; - n->object = list_make1($3); + n->object = list_make1(makeString($3)); n->newowner = $6; $$ = (Node *)n; } @@ -4497,7 +4497,7 @@ AlterOwnerStmt: ALTER AGGREGATE func_name aggr_args OWNER TO RoleId { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_TABLESPACE; - n->object = list_make1($3); + n->object = list_make1(makeString($3)); n->newowner = $6; $$ = (Node *)n; } |