Re: PostgreSQL does CAST implicitely between int and a domain derived from int

From: Jean-Michel Pouré <jm(at)poure(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: PostgreSQL does CAST implicitely between int and a domain derived from int
Date: 2009-08-29 17:38:41
Message-ID: 1251567521.4882.4.camel@acer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Le samedi 29 août 2009 à 11:16 -0400, Bruce Momjian a écrit :
> > Why is the query planner displaying ::integer
> > What does it mean?
>
> ::integer casts a data type to INTEGER. It is the same as CAST().

In Drupal database, we have two types:

integer
int_unsigned

CREATE DOMAIN int_unsigned
AS integer
CONSTRAINT int_unsigned_check CHECK ((VALUE >= 0));

Why do queries cast between integer and int_unsigned?

Kind regards,
Jean-Michel

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-08-29 17:44:08 Re: PostgreSQL does CAST implicitely between int and a domain derived from int
Previous Message Bruce Momjian 2009-08-29 15:16:03 Re: PostgreSQL does CAST implicitely between int and a domain derived from int