Re: Odd behavior with domains

From: Corey Huinker <corey(dot)huinker(at)gmail(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 02:46:16
Message-ID: CADkLM=eC6OEDEPg5Vw=Nm1sgKnLXf0UaM0RDDhJqb5Y3siNr6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 23, 2016 at 10:16 PM, Joshua D. Drake <jd(at)commandprompt(dot)com>
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:
>
> psql -U postgres
> psql (9.5.3)
> Type "help" for help.
>
> postgres=# create domain text char(3);
> CREATE DOMAIN
> postgres=# create domain text char(2);
> ERROR: type "text" already exists
> postgres=# \dD
> List of domains
> Schema | Name | Type | Modifier | Check
> --------+------+------+----------+-------
> (0 rows)
>
> postgres=# create domain textd char(2);
> CREATE DOMAIN
> postgres=# \dD
> List of domains
> Schema | Name | Type | Modifier | Check
> --------+-------+--------------+----------+-------
> public | textd | character(2) | |
> (1 row)
>
>
>
It's there.

# create domain text char(3);
CREATE DOMAIN
labels_search=# \dD public.text
List of domains
Schema | Name | Type | Modifier | Check
--------+------+--------------+----------+-------
public | text | character(3) | |
(1 row)

I've noticed the same thing when creating types that mask an existing
catalog type.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2016-06-24 02:51:34 Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)
Previous Message Michael Paquier 2016-06-24 02:36:49 Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)