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

Commit2d46017

Browse files
committed
psql: Fix display of whether table is part of publication
If a FOR ALL TABLES publication was present, \d of a table would claimfor each table that it was part of the publication, even for tables thatare ignored for this purpose, such as system tables and unlogged tables.Fix the query by using the function pg_get_publication_tables(), whichwas intended for this purpose.Reported-by: tushar <tushar.ahuja@enterprisedb.com>Reviewed-by: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>Reviewed-by: Kuntal Ghosh <kuntalghosh.2007@gmail.com>
1 parentf112f17 commit2d46017

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎src/bin/psql/describe.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,10 +2537,9 @@ describeOneTableDetails(const char *schemaname,
25372537
{
25382538
printfPQExpBuffer(&buf,
25392539
"SELECT pub.pubname\n"
2540-
" FROM pg_catalog.pg_publication pub\n"
2541-
" LEFT JOIN pg_catalog.pg_publication_rel pr\n"
2542-
" ON (pr.prpubid = pub.oid)\n"
2543-
"WHERE pr.prrelid = '%s' OR pub.puballtables\n"
2540+
" FROM pg_catalog.pg_publication pub,\n"
2541+
" pg_catalog.pg_get_publication_tables(pub.pubname)\n"
2542+
"WHERE relid = '%s'\n"
25442543
"ORDER BY 1;",
25452544
oid);
25462545

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp