Re: Current enums patch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Current enums patch
Дата
Msg-id 28858.1175549250@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Current enums patch  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-patches
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> Why not put the create-time length test into EnumValuesCreate's loop,
>> which has to grovel through the list already?

> My idea was to do the error check before calling TypeCreate. If that
> doesn't matter I can move it - it just seemed a bit cleaner to do it
> that way than to have to roll back a change to pg_type.

Well, if this were a performance-critical case then yes, but it isn't.
I'd just as soon keep the code compact.  Besides, typecmds.c isn't
really directly aware of this issue: the reason it's EnumValuesCreate's
bailiwick is that the latter is what's truncating the strings.  If we
ever wanted to change the behavior, it'd be better to keep the
knowledge more localized.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pgbench transaction timestamps
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Warning about LISTEN names