From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(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 21:32:38 |
Message-ID: | 24791.948058358@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>> Right, you saw the parser_typecast mistake. But the problem of doing
>> it properly for non-constant input to the CAST is still open.
BTW, the strings regress test is currently failing in a couple of
places, because it thinks that casting to "char" won't truncate the
string. With this patch in place, casting a constant to "char" means
casting to char(1) which indeed truncates to one character. I think
this is correct behavior, though it may surprise someone somewhere.
There are other places in the strings test that cast non-constant
expressions to "char", and those are going to change behavior as soon
as I finish inventing a parsenode for CAST. So I am not going to bother
checking in an update for the strings test until the dust settles.
> 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?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-01-16 22:04:44 | Re: [HACKERS] I think we need an explicit parsetree node for CAST |
Previous Message | Tom Lane | 2000-01-16 20:47:11 | Re: [HACKERS] pg_dump not in very good shape |