mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 05:21:27 +03:00
Fix query that gets remote relation info
Publisher relation can be incorrectly chosen, if there are more than one relation in different schemas with the same name. Author: Euler Taveira <euler@timbira.com.br>
This commit is contained in:
parent
e495c1683f
commit
61ecc90be6
@ -560,8 +560,9 @@ fetch_remote_table_info(char *nspname, char *relname,
|
||||
/* First fetch Oid and replica identity. */
|
||||
initStringInfo(&cmd);
|
||||
appendStringInfo(&cmd, "SELECT c.oid, c.relreplident"
|
||||
" FROM pg_catalog.pg_class c,"
|
||||
" pg_catalog.pg_namespace n"
|
||||
" FROM pg_catalog.pg_class c"
|
||||
" INNER JOIN pg_catalog.pg_namespace n"
|
||||
" ON (c.relnamespace = n.oid)"
|
||||
" WHERE n.nspname = %s"
|
||||
" AND c.relname = %s"
|
||||
" AND c.relkind = 'r'",
|
||||
|
Loading…
x
Reference in New Issue
Block a user