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

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Jean-Michel Pouré <jm(at)poure(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PostgreSQL does CAST implicitely between int and a domain derived from int during SELECT query
Date: 2009-08-26 14:07:33
Message-ID: 4A9541A5.2010807@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jean-Michel Pouré wrote:
> Dear friends,
>
> Thank you for your previous answers. I am running into a systemic
> problem using Drupal under PostgreSQL 8.4
>
> Drupal relies heavily on a domain derived from int:
>
> CREATE DOMAIN int_unsigned
> AS integer
> CONSTRAINT int_unsigned_check CHECK ((VALUE >= 0));
>
> Analysing slow queries, I noticed that PostgreSQL 8.4 would cast data
> from int4 to int_unsigned.
>
>
>

Isn't that cast effectively a no-op?

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-26 14:07:41 Re: PostgreSQL does CAST implicitely between int and a domain derived from int during SELECT query
Previous Message Andrew Dunstan 2009-08-26 14:02:33 pretty print viewdefs