From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] I think we need an explicit parsetree node for CAST |
Date: | 2000-01-16 22:04:44 |
Message-ID: | 200001162204.RAA00798@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > Yes, and constants with cases in SELECT INTO are broken too.
>
> Huh? I'm not sure if I follow this or not --- would you give an
> example?
Here is the mail I sent out last night. It shows a failure:
---------------------------------------------------------------------------
I see your issue, and I don't know the code well enough to comment on
it.
I was able to do:
test=> select 'x' as fred into test ;
NOTICE: Attribute 'fred' has an unknown type
Relation created; continue
SELECT
test=> \d test
Table "test"
Attribute | Type | Extra
-----------+---------+-------
fred | unknown |
---------------------------------------------------------------------------
test=> select 'x'::varchar as fred into test ;
SELECT
test=> \d test
Table "test"
Attribute | Type | Extra
-----------+------------+-------
fred | varchar(0) |
Seems we should disallow this. This last one is the one you want to
fix:
---------------------------------------------------------------------------
test=> select 'x'::varchar(20) as fred into test ;
SELECT
test=> \d test
Table "test"
Attribute | Type | Extra
-----------+------------+-------
fred | varchar(0) |
-
--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Xun Cheng | 2000-01-16 23:44:22 | Re: [HACKERS] hybrid hash, cont. of development suggestion needed |
Previous Message | Tom Lane | 2000-01-16 21:32:38 | Re: [HACKERS] I think we need an explicit parsetree node for CAST |