Re: [PATCHES] Quoting of psql \d output

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <chriskl(at)familyhealth(dot)com(dot)au>
Subject: Re: [PATCHES] Quoting of psql \d output
Date: 2003-12-31 10:50:04
Message-ID: 03AF4E498C591348A42FC93DEA9661B872034E@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> Sent: 31 December 2003 02:41
> To: PostgreSQL-development
> Cc: Tom Lane; Peter Eisentraut; chriskl(at)familyhealth(dot)com(dot)au
> Subject: Re: [HACKERS] [PATCHES] Quoting of psql \d output
>
> We have been discussing this patch on the patches list:
>
> ftp://candle.pha.pa.us/pub/postgresql/mypatches/fmtId
>
> In short, the patch removes quoting from \d displays when
> quotes is not required (e.g. identifier is all lower case and
> has no embedded spaces).

Hi Bruce,

Whilst I can see Peter's arguments are valid, the output from psql falls
into a separate category IMO. These are not error messages, or notices
but output specifically designed to describe the schema to the user, and
as such I believe should be as clean as possible.

We have in fact had similar discussions in pgAdmin - for example, pga1
quoted everything to be safe, and users complained because it 'uglified'
output. Pga3 uses a modified version of fmtID() (to make it work with
the wxString class instead of char arrays) and even now I hear the odd
grumble about quotes when they actually need to be there!

Wrt to Tom's objection, short of moving fmtID() into it's own source
file, or duplicating it in psql (which I'm not advocating) I don't see
that there is much we could do. I do think that the benefit outweighs
the disadvantages however.

+1 for applying the patch.

Regards, Dave.

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2003-12-31 12:01:55 Re: PostgreSQL speakers needed for OSCON 2004
Previous Message Bret Busby 2003-12-31 09:24:02 Re: Is my MySQL Gaining ?