Re: Quoting of psql \d output - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Quoting of psql \d output
Date
Msg-id 200312231602.hBNG2CJ12677@candle.pha.pa.us
Whole thread Raw
In response to Re: Quoting of psql \d output  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-patches
Christopher Kings-Lynne wrote:
> Hey Bruce,
>
> While you're at it - use the same sort of code to conditionally quote
> index, rule and constraint names ...

Those are in the patch.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.101
diff -c -c -r1.101 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml    1 Dec 2003 22:21:54 -0000    1.101
--- doc/src/sgml/ref/psql-ref.sgml    23 Dec 2003 04:56:21 -0000
***************
*** 957,962 ****
--- 957,963 ----
          Lists all available schemas (namespaces). If <replaceable
          class="parameter">pattern</replaceable> (a regular expression)
          is specified, only schemas whose names match the pattern are listed.
+         Non-local temporary schemas are suppressed.
          </para>
          </listitem>
        </varlistentry>
Index: src/bin/psql/describe.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/describe.c,v
retrieving revision 1.90
diff -c -c -r1.90 describe.c
*** src/bin/psql/describe.c    1 Dec 2003 22:21:54 -0000    1.90
--- src/bin/psql/describe.c    23 Dec 2003 04:56:22 -0000
***************
*** 1626,1639 ****

      initPQExpBuffer(&buf);
      printfPQExpBuffer(&buf,
!                       "SELECT n.nspname AS \"%s\",\n"
!                       "       u.usename AS \"%s\"\n"
          "FROM pg_catalog.pg_namespace n LEFT JOIN pg_catalog.pg_user u\n"
!                       "       ON n.nspowner=u.usesysid\n",
                        _("Name"),
                        _("Owner"));
!
!     processNamePattern(&buf, pattern, false, false,
                         NULL, "n.nspname", NULL,
                         NULL);

--- 1626,1640 ----

      initPQExpBuffer(&buf);
      printfPQExpBuffer(&buf,
!         "SELECT n.nspname AS \"%s\",\n"
!         "       u.usename AS \"%s\"\n"
          "FROM pg_catalog.pg_namespace n LEFT JOIN pg_catalog.pg_user u\n"
!         "       ON n.nspowner=u.usesysid\n"
!         "WHERE    (n.nspname NOT LIKE 'pg\\\\_temp\\\\_%%' OR\n"
!         "         n.nspname = (pg_catalog.current_schemas(true))[1])\n",    /* temp schema is first */
                        _("Name"),
                        _("Owner"));
!     processNamePattern(&buf, pattern, true, false,
                         NULL, "n.nspname", NULL,
                         NULL);


pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Temporary tables and miscellaneous schemas
Next
From: "Peter Eisentraut"
Date:
Subject: Re: Quoting of psql \d output