Add a semicolon to query related to search_path - Mailing list pgsql-hackers

From Tatsuro Yamada
Subject Add a semicolon to query related to search_path
Date
Msg-id b9ea9035-ad1a-eef2-fda4-7a6513e69599@lab.ntt.co.jp
Whole thread Raw
Responses Re: Add a semicolon to query related to search_path
List pgsql-hackers
Hi,

I found some improvements in Client Applications in /src/bin/scripts when I
resumed development of progress monitor for cluster command.

Attached patch gives the following query a semicolon for readability.

   s/SELECT pg_catalog.set_config ('search_path', '', false)/
     SELECT pg_catalog.set_config ('search_path', '', false);/

   s/RESET search_path/RESET search_path;/


For example,
Client application vacuumdb's results using the patch are following:

   # Not patched #

   $ vacuumdb -e -Zt 'pg_am(amname)'

   SELECT pg_catalog.set_config ('search_path', '', false)
   vacuumdb: vacuuming database "postgres"
   RESET search_path
   SELECT c.relname, ns.nspname
   FROM pg_catalog.pg_class c, pg_catalog.pg_namespace ns
   WHERE c.relnamespace OPERATOR (pg_catalog. =) Ns.oid
   AND c.oid OPERATOR (pg_catalog. =) 'Pg_am' :: pg_catalog.regclass;
   SELECT pg_catalog.set_config ('search_path', '', false)
   ANALYZE pg_catalog.pg_am (amname);

   # Patched #

   $ vacuumdb -e -Zt 'pg_am(amname)'

   SELECT pg_catalog.set_config ('search_path', '', false);
   vacuumdb: vacuuming database "postgres"
   RESET search_path;
   SELECT c.relname, ns.nspname
   FROM pg_catalog.pg_class c, pg_catalog.pg_namespace ns
   WHERE c.relnamespace OPERATOR (pg_catalog. =) Ns.oid
   AND c.oid OPERATOR (pg_catalog. =) 'Pg_am' :: pg_catalog.regclass;
   SELECT pg_catalog.set_config ('search_path', '', false);
   ANALYZE pg_catalog.pg_am (amname);


I tested "make check-world" and "make installcheck-world" on 777e6ddf1
and are fine.

Regards,
Tatsuro Yamada
NTT Open Source Software Center


Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Expression errors with "FOR UPDATE" and postgres_fdw withpartition wise join enabled.
Next
From: Thomas Munro
Date:
Subject: Re: Proposal: SLRU to Buffer Cache