mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
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.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/alter.c,v 1.26 2008/01/01 19:45:48 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/alter.c,v 1.27 2008/02/07 21:07:55 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -216,7 +216,7 @@ ExecAlterOwnerStmt(AlterOwnerStmt *stmt)
|
||||
break;
|
||||
|
||||
case OBJECT_DATABASE:
|
||||
AlterDatabaseOwner((char *) linitial(stmt->object), newowner);
|
||||
AlterDatabaseOwner(strVal(linitial(stmt->object)), newowner);
|
||||
break;
|
||||
|
||||
case OBJECT_FUNCTION:
|
||||
@ -224,7 +224,7 @@ ExecAlterOwnerStmt(AlterOwnerStmt *stmt)
|
||||
break;
|
||||
|
||||
case OBJECT_LANGUAGE:
|
||||
AlterLanguageOwner((char *) linitial(stmt->object), newowner);
|
||||
AlterLanguageOwner(strVal(linitial(stmt->object)), newowner);
|
||||
break;
|
||||
|
||||
case OBJECT_OPERATOR:
|
||||
@ -244,11 +244,11 @@ ExecAlterOwnerStmt(AlterOwnerStmt *stmt)
|
||||
break;
|
||||
|
||||
case OBJECT_SCHEMA:
|
||||
AlterSchemaOwner((char *) linitial(stmt->object), newowner);
|
||||
AlterSchemaOwner(strVal(linitial(stmt->object)), newowner);
|
||||
break;
|
||||
|
||||
case OBJECT_TABLESPACE:
|
||||
AlterTableSpaceOwner((char *) linitial(stmt->object), newowner);
|
||||
AlterTableSpaceOwner(strVal(linitial(stmt->object)), newowner);
|
||||
break;
|
||||
|
||||
case OBJECT_TYPE:
|
||||
|
Reference in New Issue
Block a user