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.


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to