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

Commit4c2071c

Browse files
committed
Repair bogus rule display of attr lists.
1 parent1204c3e commit4c2071c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

‎src/backend/utils/adt/ruleutils.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* out of its tuple
44
*
55
* IDENTIFICATION
6-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.40 2000/02/1503:37:56 thomas Exp $
6+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.41 2000/02/1508:24:12 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -992,17 +992,21 @@ get_select_query_def(Query *query, deparse_context *context)
992992
quote_identifier(rte->relname),
993993
inherit_marker(rte));
994994
if (strcmp(rte->relname,rte->ref->relname)!=0)
995-
{
996-
List*col;
997995
appendStringInfo(buf," %s",
998996
quote_identifier(rte->ref->relname));
997+
if (rte->ref->attrs!=NIL)
998+
{
999+
List*col;
1000+
9991001
appendStringInfo(buf," (");
1000-
foreach(col,rte->ref->attrs)
1002+
foreach(col,rte->ref->attrs)
10011003
{
1002-
if (col!=lfirst(rte->ref->attrs))
1004+
if (col!=rte->ref->attrs)
10031005
appendStringInfo(buf,", ");
1004-
appendStringInfo(buf,"%s",strVal(col));
1006+
appendStringInfo(buf,"%s",
1007+
quote_identifier(strVal(lfirst(col))));
10051008
}
1009+
appendStringInfo(buf,")");
10061010
}
10071011
}
10081012
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp