Re: Odd behavior with domains

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Odd behavior with domains
Дата
Msg-id 20160624030042.GA251264@alvherre.pgsql
обсуждение исходный текст
Ответ на Odd behavior with domains  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: Odd behavior with domains  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Odd behavior with domains  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Joshua D. Drake wrote:
> Hey,
> 
> So this came across my twitter feed:
> 
> https://pbs.twimg.com/media/ClqIJtmXEAA5IGt.png
> 
> I have verified the oddness with a newer version:

Well, it's not specifically related to domains -- it's related to the
fact that pg_catalog objects mask the domain you created in the public
schema, because pg_catalog is by default in front of all other schemas
unless you explicitely put it elsewhere.

alvherre=# create domain text char(3);
CREATE DOMAIN
alvherre=# \dD             Listado de dominiosEsquema | Nombre | Tipo | Modificador | Check 
---------+--------+------+-------------+-------
(0 filas)

alvherre=# set search_path to 'public', 'pg_catalog';
SET
alvherre=# \dD                 Listado de dominiosEsquema | Nombre |     Tipo     | Modificador | Check 
---------+--------+--------------+-------------+-------public  | text   | character(3) |             | 
(1 fila)

alvherre=# reset search_path;
RESET
alvherre=# \dD             Listado de dominiosEsquema | Nombre | Tipo | Modificador | Check 
---------+--------+------+-------------+-------
(0 filas)

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: tuplesort.c's copytup_index() is dead code
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Odd behavior with domains