mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
Improve various new-to-v18 appendStringInfo calls
Similar to 8461424fd
, here we adjust a few new locations which were not
using the most suitable appendStringInfo* function for the intended
purpose.
Author: David Rowley <drowleyml@gmail.com
Discussion: https://postgr.es/m/CAApHDvqJnNjueb=Eoj8K+8n0g7nj_AcPWSiCj5RNV4fDejAfqA@mail.gmail.com
This commit is contained in:
@@ -940,15 +940,15 @@ fetch_remote_table_info(char *nspname, char *relname, LogicalRepRelation *lrel,
|
||||
* Now fetch column names and types.
|
||||
*/
|
||||
resetStringInfo(&cmd);
|
||||
appendStringInfo(&cmd,
|
||||
"SELECT a.attnum,"
|
||||
" a.attname,"
|
||||
" a.atttypid,"
|
||||
" a.attnum = ANY(i.indkey)");
|
||||
appendStringInfoString(&cmd,
|
||||
"SELECT a.attnum,"
|
||||
" a.attname,"
|
||||
" a.atttypid,"
|
||||
" a.attnum = ANY(i.indkey)");
|
||||
|
||||
/* Generated columns can be replicated since version 18. */
|
||||
if (server_version >= 180000)
|
||||
appendStringInfo(&cmd, ", a.attgenerated != ''");
|
||||
appendStringInfoString(&cmd, ", a.attgenerated != ''");
|
||||
|
||||
appendStringInfo(&cmd,
|
||||
" FROM pg_catalog.pg_attribute a"
|
||||
|
Reference in New Issue
Block a user