Re: Add CREATE support to event triggers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add CREATE support to event triggers
Дата
Msg-id 30665.1391630188@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add CREATE support to event triggers  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Add CREATE support to event triggers  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Robert Haas escribi�:
>> How about doing whatever pg_dump does?

> We use format_type() for that as far as I know.  What it does
> differently is use undecorated names defined by the standard for some
> types, which are never schema qualified and are never ambiguous because
> they are reserved words that would require quoting if used by
> user-defined type names.  We can't use that here: somewhere upthread we
> noticed issues when using those which is why we're now trying to use
> catalog names instead of those special names.  (I don't think it's
> impossible to use such names: we just need to ensure we handle quoting
> correctly for the funny cases such as "char" and "bit.)

Yeah, but wouldn't that complexity also bubble into user code within the
event triggers?  Since there's no real need for SQL standard compliance
in this context, I think minimizing the number of weird formats is a
win.

> One idea is to chop the typmod output string at the closing parens.

+1.  The only reason timestamptypmodout works like that is that we're
trying to match the SQL standard's spelling of the type names, and
that committee apparently considers it an off day whenever they can't
invent some randomly-incompatible-with-everything syntax.
        regards, tom lane



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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: narwhal and PGDLLIMPORT
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: jsonb and nested hstore