Re: Type definition process (was Re: MemoryContextAlloc: invalid request size 1934906735)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Type definition process (was Re: MemoryContextAlloc: invalid request size 1934906735)
Дата
Msg-id 25987.1030649849@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Type definition process (was Re: MemoryContextAlloc: invalid request size 1934906735)  ("D'Arcy J.M. Cain" <darcy@druid.net>)
Ответы Re: Type definition process (was Re: MemoryContextAlloc: invalid request size 1934906735)
Список pgsql-hackers
"D'Arcy J.M. Cain" <darcy@druid.net> writes:
> One thing I do see though is that there is a completion issue.

Well, (a) the shell type can't be used for anything till you turn it
into a real type, and (b) the completion issue already exists, and has
for a long time; you've always been able to create a shell type by using
a not-yet-known type name as the return type of a function.  It's just
not well documented.

>  1. An incomplete CREATE TYPE raises an error if not inside a transaction 
> block.

I have no intention of implementing this.  (1) It wouldn't really
simplify life anyway, since we'd still need all the same guard code to
prevent you from using the shell type within the creating transaction.
(2) It would break existing pg_dump scripts, which don't know they'd
need to do this.

Wrapping the sequence inside a transaction is a good practice, but
I don't feel that we have to try to force good practice on people.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: tweaking MemSet() performance
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] tweaking MemSet() performance