Re: Varchar standard compliance

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Varchar standard compliance
Date: 2000-11-17 18:51:27
Message-ID: Pine.LNX.4.21.0011171948490.789-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is there a reason why the conversion from CHAR to CHAR(1) is done in
analyze.c:transformColumnType rather than right in the
grammar? Currently, you get this incorrect behaviour:

peter=# select cast('voodoo' as char(1));
?column?
----------
v
(1 row)

peter=# select cast('voodoo' as char);
?column?
----------
voodoo
(1 row)

Both should return 'v'.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ross J. Reedstrom 2000-11-17 18:57:37 Re: AW: Coping with 'C' vs 'newC' function language namesh
Previous Message Peter Eisentraut 2000-11-17 18:23:13 Re: Coping with 'C' vs 'newC' function language names