From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Odd behavior with domains |
Date: | 2016-06-24 03:00:42 |
Message-ID: | 20160624030042.GA251264@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 dominios
Esquema | Nombre | Tipo | Modificador | Check
---------+--------+------+-------------+-------
(0 filas)
alvherre=# set search_path to 'public', 'pg_catalog';
SET
alvherre=# \dD
Listado de dominios
Esquema | Nombre | Tipo | Modificador | Check
---------+--------+--------------+-------------+-------
public | text | character(3) | |
(1 fila)
alvherre=# reset search_path;
RESET
alvherre=# \dD
Listado de dominios
Esquema | Nombre | Tipo | Modificador | Check
---------+--------+------+-------------+-------
(0 filas)
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-06-24 03:00:46 | Re: Odd behavior with domains |
Previous Message | Tom Lane | 2016-06-24 02:59:07 | Re: tuplesort.c's copytup_index() is dead code |