From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: bug? non working casts for domain |
Date: | 2006-05-06 23:10:07 |
Message-ID: | 200605062310.k46NA7913100@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I can confirm that this is a bug. The attached SQL shows that creating
a CAST _to_ a domain type doesn't work, though the cast can be created.
The attached SQL provided by Fabien shows the failure.
The error is coming from parse_expr.c::typecast_expression, and its call
to typenameTypeId(). I wish I understood how we do domains better to
fix this properly. Anyone?
---------------------------------------------------------------------------
Fabien COELHO wrote:
>
> Dear PostgreSQL developer.
>
> Although it is allowed to create a cast for a domain, it seems that there
> is no way to trigger it. You can find attached an sql script to illustrate
> the issue with postgresql 8.1.3. The create cast and create domain
> documentations do not seem to discuss this point.
>
> ISTM that it is a pg bug. Indeed, either
>
> (1) the create cast should be rejected if it is not allowed for domains.
>
> or
>
> (2) the function should be triggered by explicit casts to the domain.
--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 673 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-07 01:53:46 | Re: pseudo-type record arguments for PL-functions |
Previous Message | Thomas Hallgren | 2006-05-06 22:16:16 | Re: pseudo-type record arguments for PL-functions |