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

Commit69c1698

Browse files
committed
psql: Don't try to print a partition constraint we didn't fetch.
If \d rather than \d+ is used, then verbose is false and we don't askthe server for the partition constraint; so we shouldn't print it inthat case either.Maksim Milyutin, per a report from Jesper Pedersen. Reviewed byJesper Pedersen and Amit Langote.Discussion:http://postgr.es/m/2af5fc4d-7bcc-daa8-4fe6-86274bea363c@redhat.com
1 parente55d964 commit69c1698

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

‎src/bin/psql/describe.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,13 +1985,16 @@ describeOneTableDetails(const char *schemaname,
19851985
partdef);
19861986
printTableAddFooter(&cont,tmpbuf.data);
19871987

1988-
/* If there isn't any constraint, show that explicitly */
1989-
if (partconstraintdef==NULL||partconstraintdef[0]=='\0')
1990-
printfPQExpBuffer(&tmpbuf,_("No partition constraint"));
1991-
else
1992-
printfPQExpBuffer(&tmpbuf,_("Partition constraint: %s"),
1993-
partconstraintdef);
1994-
printTableAddFooter(&cont,tmpbuf.data);
1988+
if (verbose)
1989+
{
1990+
/* If there isn't any constraint, show that explicitly */
1991+
if (partconstraintdef==NULL||partconstraintdef[0]=='\0')
1992+
printfPQExpBuffer(&tmpbuf,_("No partition constraint"));
1993+
else
1994+
printfPQExpBuffer(&tmpbuf,_("Partition constraint: %s"),
1995+
partconstraintdef);
1996+
printTableAddFooter(&cont,tmpbuf.data);
1997+
}
19951998

19961999
PQclear(result);
19972000
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp