@@ -1553,8 +1553,8 @@ describeOneTableDetails(const char *schemaname,
15531553appendPQExpBufferStr (& buf ,",\n NULL AS indexdef" );
15541554if (tableinfo .relkind == 'f' && pset .sversion >=90200 )
15551555appendPQExpBufferStr (& buf ,",\n CASE WHEN attfdwoptions IS NULL THEN '' ELSE "
1556- " '(' || array_to_string(ARRAY(SELECT quote_ident(option_name) || ' ' || quote_literal(option_value) FROM "
1557- " pg_options_to_table(attfdwoptions)), ', ') || ')' END AS attfdwoptions" );
1556+ " '(' ||pg_catalog. array_to_string(ARRAY(SELECTpg_catalog. quote_ident(option_name) || ' ' ||pg_catalog. quote_literal(option_value) FROM "
1557+ "pg_catalog. pg_options_to_table(attfdwoptions)), ', ') || ')' END AS attfdwoptions" );
15581558else
15591559appendPQExpBufferStr (& buf ,",\n NULL AS attfdwoptions" );
15601560if (verbose )
@@ -1904,7 +1904,7 @@ describeOneTableDetails(const char *schemaname,
19041904"\n a.attnum=d.refobjsubid)"
19051905"\nWHERE d.classid='pg_catalog.pg_class'::pg_catalog.regclass"
19061906"\n AND d.refclassid='pg_catalog.pg_class'::pg_catalog.regclass"
1907- "\n AND d.objid=%s "
1907+ "\n AND d.objid='%s' "
19081908"\n AND d.deptype='a'" ,
19091909oid );
19101910
@@ -2138,7 +2138,7 @@ describeOneTableDetails(const char *schemaname,
21382138{
21392139printfPQExpBuffer (& buf ,
21402140"SELECT pol.polname,\n"
2141- "CASE WHEN pol.polroles = '{0}' THEN NULL ELSE array_to_string(array(select rolname from pg_roles where oid = any (pol.polroles) order by 1),',') END,\n"
2141+ "CASE WHEN pol.polroles = '{0}' THEN NULL ELSEpg_catalog. array_to_string(array(select rolname frompg_catalog. pg_roles where oid = any (pol.polroles) order by 1),',') END,\n"
21422142"pg_catalog.pg_get_expr(pol.polqual, pol.polrelid),\n"
21432143"pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid),\n"
21442144"CASE pol.polcmd \n"
@@ -2498,13 +2498,13 @@ describeOneTableDetails(const char *schemaname,
24982498/* Footer information about foreign table */
24992499printfPQExpBuffer (& buf ,
25002500"SELECT s.srvname,\n"
2501- " array_to_string(ARRAY(SELECT "
2502- " quote_ident(option_name) || ' ' || "
2503- " quote_literal(option_value) FROM "
2504- " pg_options_to_table(ftoptions)), ', ') "
2501+ "pg_catalog. array_to_string(ARRAY(\n "
2502+ "SELECT pg_catalog. quote_ident(option_name)"
2503+ "|| ' ' || pg_catalog. quote_literal(option_value)\n "
2504+ " FROM pg_catalog. pg_options_to_table(ftoptions)), ', ')\n "
25052505"FROM pg_catalog.pg_foreign_table f,\n"
25062506" pg_catalog.pg_foreign_server s\n"
2507- "WHERE f.ftrelid =%s AND s.oid = f.ftserver;" ,
2507+ "WHERE f.ftrelid ='%s' AND s.oid = f.ftserver;" ,
25082508oid );
25092509result = PSQLexec (buf .data );
25102510if (!result )
@@ -2935,16 +2935,16 @@ listDbRoleSettings(const char *pattern, const char *pattern2)
29352935
29362936printfPQExpBuffer (& buf ,"SELECT rolname AS \"%s\", datname AS \"%s\",\n"
29372937"pg_catalog.array_to_string(setconfig, E'\\n') AS \"%s\"\n"
2938- "FROM pg_db_role_setting AS s\n"
2939- "LEFT JOIN pg_database ONpg_database .oid = setdatabase\n"
2940- "LEFT JOIN pg_roles ONpg_roles .oid = setrole\n" ,
2938+ "FROMpg_catalog. pg_db_role_setting s\n"
2939+ "LEFT JOINpg_catalog. pg_databased ONd .oid = setdatabase\n"
2940+ "LEFT JOINpg_catalog. pg_rolesr ONr .oid = setrole\n" ,
29412941gettext_noop ("Role" ),
29422942gettext_noop ("Database" ),
29432943gettext_noop ("Settings" ));
29442944havewhere = processSQLNamePattern (pset .db ,& buf ,pattern , false, false,
2945- NULL ,"pg_roles .rolname" ,NULL ,NULL );
2945+ NULL ,"r .rolname" ,NULL ,NULL );
29462946processSQLNamePattern (pset .db ,& buf ,pattern2 ,havewhere , false,
2947- NULL ,"pg_database .datname" ,NULL ,NULL );
2947+ NULL ,"d .datname" ,NULL ,NULL );
29482948appendPQExpBufferStr (& buf ,"ORDER BY 1, 2;" );
29492949}
29502950else
@@ -3173,13 +3173,13 @@ listLanguages(const char *pattern, bool verbose, bool showSystem)
31733173{
31743174appendPQExpBuffer (& buf ,
31753175",\n NOT l.lanispl AS \"%s\",\n"
3176- " l.lanplcallfoid::regprocedure AS \"%s\",\n"
3177- " l.lanvalidator::regprocedure AS \"%s\",\n " ,
3176+ " l.lanplcallfoid::pg_catalog. regprocedure AS \"%s\",\n"
3177+ " l.lanvalidator::pg_catalog. regprocedure AS \"%s\",\n " ,
31783178gettext_noop ("Internal Language" ),
31793179gettext_noop ("Call Handler" ),
31803180gettext_noop ("Validator" ));
31813181if (pset .sversion >=90000 )
3182- appendPQExpBuffer (& buf ,"l.laninline::regprocedure AS \"%s\",\n " ,
3182+ appendPQExpBuffer (& buf ,"l.laninline::pg_catalog. regprocedure AS \"%s\",\n " ,
31833183gettext_noop ("Inline Handler" ));
31843184printACLColumn (& buf ,"l.lanacl" );
31853185}
@@ -4304,10 +4304,10 @@ listForeignDataWrappers(const char *pattern, bool verbose)
43044304printACLColumn (& buf ,"fdwacl" );
43054305appendPQExpBuffer (& buf ,
43064306",\n CASE WHEN fdwoptions IS NULL THEN '' ELSE "
4307- " '(' || array_to_string(ARRAY(SELECT "
4308- " quote_ident(option_name) || ' ' || "
4309- " quote_literal(option_value) FROM "
4310- " pg_options_to_table(fdwoptions)), ', ') || ')' "
4307+ " '(' ||pg_catalog. array_to_string(ARRAY(SELECT "
4308+ "pg_catalog. quote_ident(option_name) || ' ' || "
4309+ "pg_catalog. quote_literal(option_value) FROM "
4310+ "pg_catalog. pg_options_to_table(fdwoptions)), ', ') || ')' "
43114311" END AS \"%s\"" ,
43124312gettext_noop ("FDW Options" ));
43134313
@@ -4385,10 +4385,10 @@ listForeignServers(const char *pattern, bool verbose)
43854385" s.srvtype AS \"%s\",\n"
43864386" s.srvversion AS \"%s\",\n"
43874387" CASE WHEN srvoptions IS NULL THEN '' ELSE "
4388- " '(' || array_to_string(ARRAY(SELECT "
4389- " quote_ident(option_name) || ' ' || "
4390- " quote_literal(option_value) FROM "
4391- " pg_options_to_table(srvoptions)), ', ') || ')' "
4388+ " '(' ||pg_catalog. array_to_string(ARRAY(SELECT "
4389+ "pg_catalog. quote_ident(option_name) || ' ' || "
4390+ "pg_catalog. quote_literal(option_value) FROM "
4391+ "pg_catalog. pg_options_to_table(srvoptions)), ', ') || ')' "
43924392" END AS \"%s\",\n"
43934393" d.description AS \"%s\"" ,
43944394gettext_noop ("Type" ),
@@ -4403,7 +4403,7 @@ listForeignServers(const char *pattern, bool verbose)
44034403
44044404if (verbose )
44054405appendPQExpBufferStr (& buf ,
4406- "LEFT JOIN pg_description d\n "
4406+ "LEFT JOINpg_catalog. pg_description d\n "
44074407"ON d.classoid = s.tableoid AND d.objoid = s.oid "
44084408"AND d.objsubid = 0\n" );
44094409
@@ -4459,10 +4459,10 @@ listUserMappings(const char *pattern, bool verbose)
44594459if (verbose )
44604460appendPQExpBuffer (& buf ,
44614461",\n CASE WHEN umoptions IS NULL THEN '' ELSE "
4462- " '(' || array_to_string(ARRAY(SELECT "
4463- " quote_ident(option_name) || ' ' || "
4464- " quote_literal(option_value) FROM "
4465- " pg_options_to_table(umoptions)), ', ') || ')' "
4462+ " '(' ||pg_catalog. array_to_string(ARRAY(SELECT "
4463+ "pg_catalog. quote_ident(option_name) || ' ' || "
4464+ "pg_catalog. quote_literal(option_value) FROM "
4465+ "pg_catalog. pg_options_to_table(umoptions)), ', ') || ')' "
44664466" END AS \"%s\"" ,
44674467gettext_noop ("FDW Options" ));
44684468
@@ -4522,10 +4522,10 @@ listForeignTables(const char *pattern, bool verbose)
45224522if (verbose )
45234523appendPQExpBuffer (& buf ,
45244524",\n CASE WHEN ftoptions IS NULL THEN '' ELSE "
4525- " '(' || array_to_string(ARRAY(SELECT "
4526- " quote_ident(option_name) || ' ' || "
4527- " quote_literal(option_value) FROM "
4528- " pg_options_to_table(ftoptions)), ', ') || ')' "
4525+ " '(' ||pg_catalog. array_to_string(ARRAY(SELECT "
4526+ "pg_catalog. quote_ident(option_name) || ' ' || "
4527+ "pg_catalog. quote_literal(option_value) FROM "
4528+ "pg_catalog. pg_options_to_table(ftoptions)), ', ') || ')' "
45294529" END AS \"%s\",\n"
45304530" d.description AS \"%s\"" ,
45314531gettext_noop ("FDW Options" ),