Re: User-defined type name begins with the underscore character (_) can be created

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: User-defined type name begins with the underscore character (_) can be created
Дата
Msg-id 4551.1165943021@sss.pgh.pa.us
обсуждение исходный текст
Ответ на User-defined type name begins with the underscore character (_) can be created  (Pavel Golub <pavel@microolap.com>)
Список pgsql-bugs
Pavel Golub <pavel@microolap.com> writes:
> Documentation says:
> "User-defined type names cannot begin with the
> underscore character (_)

We've never actually enforced that AFAIK, so this might be considered a
documentation bug.

> CREATE TYPE _my AS (id int4, id2 int4);
>
> CREATE TABLE my_table(
> my_arr my[]
> );

You could argue that the problem there is that LookupTypeName is not
verifying that what it finds is really an array of the specified type.
We could make it look up the given name without modification and then
apply get_array_type(), but this would mean two catalog lookups not one.
Still, that might be better than possibly breaking applications that
have historically worked.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SPI_getvalue calls output function w/o pushing existing SPI connection + 2 extra issues
Следующее
От: Danish Siddiqui
Дата:
Сообщение: postgresql installation on centOS not working