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

Commit47c5b8f

Browse files
committed
Fix unwarranted assumption that a cached rowtype would stick around
for the lifespan of the CreateStmt. Per buildfarm member jaguar.
1 parent45c88a5 commit47c5b8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/parser/parse_utilcmd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
2020
* Portions Copyright (c) 1994, Regents of the University of California
2121
*
22-
*$PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.37 2010/01/28 23:21:12 petere Exp $
22+
*$PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.38 2010/02/03 05:46:37 tgl Exp $
2323
*
2424
*-------------------------------------------------------------------------
2525
*/
@@ -822,10 +822,10 @@ transformOfType(ParseState *pstate, CreateStmtContext *cxt, TypeName *ofTypename
822822
tupdesc=lookup_rowtype_tupdesc(ofTypeId,-1);
823823
for (i=0;i<tupdesc->natts;i++)
824824
{
825-
ColumnDef*n=makeNode(ColumnDef);
826825
Form_pg_attributeattr=tupdesc->attrs[i];
826+
ColumnDef*n=makeNode(ColumnDef);
827827

828-
n->colname=NameStr(attr->attname);
828+
n->colname=pstrdup(NameStr(attr->attname));
829829
n->typeName=makeTypeNameFromOid(attr->atttypid,attr->atttypmod);
830830
n->constraints=NULL;
831831
n->is_local= true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp