Re: [PATCHES] Quoting of psql \d output

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: [PATCHES] Quoting of psql \d output
Дата
Msg-id 03AF4E498C591348A42FC93DEA9661B872034E@mail.vale-housing.co.uk
обсуждение исходный текст
Список pgsql-hackers

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> Sent: 31 December 2003 02:41
> To: PostgreSQL-development
> Cc: Tom Lane; Peter Eisentraut; chriskl@familyhealth.com.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.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Preventing stack-overflow crashes (improving on max_expr_depth)
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: cache in plpgsql