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)
Список
Дерево обсуждения
Re: Odd behavior with domains Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Odd behavior with domains "Joshua D. Drake" <jd@commandprompt.com>
Re: Odd behavior with domains Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Odd behavior with domains "David G. Johnston" <david.g.johnston@gmail.com>
Re: Odd behavior with domains Robert Haas <robertmhaas@gmail.com>
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
Дата:
От: Tom Lane
Дата:
Сообщение: Re: Odd behavior with domains
FAQ