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

From Christopher Kings-Lynne
Subject Re: Quoting of psql \d output
Date
Msg-id 3FE863FD.20004@familyhealth.com.au
Whole thread Raw
In response to Quoting of psql \d output  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Quoting of psql \d output
Re: Quoting of psql \d output
List pgsql-patches
Hey Bruce,

While you're at it - use the same sort of code to conditionally quote
index, rule and constraint names ...

Chris

Bruce Momjian wrote:

> psql \d always double-quotes table names:
>
>           Table "public.xx"
>      Column |  Type   | Modifiers
>     --------+---------+-----------
>      y      | integer |
>     Indexes:
>         "ii" btree (y)
>
>
> With this patch, double-quotes are not used when not required:
>
>     test=> \d xx
>            Table public.xx
>      Column |  Type   | Modifiers
>     --------+---------+-----------
>      y      | integer |
>     Indexes:
>         ii btree (y)
>
>
> but does in this case:
>
>     test=> \d "xx y"
>          Table public."xx y"
>      Column |  Type   | Modifiers
>     --------+---------+-----------
>      y      | integer |
>     Indexes:
>         vv btree (y)
>
> This patch uses pg_dump fmtId() to double-quote only when necessary.


pgsql-patches by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: [GENERAL] Temporary tables and miscellaneous schemas
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Temporary tables and miscellaneous schemas