Re: CHAR constants

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
Cc: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CHAR constants
Date: 2002-07-12 17:09:09
Message-ID: 14680.1026493749@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart <lockhart(at)fourpalms(dot)org> writes:
> So, what should the behavior be of a constant declared as
> CHAR 'hi'

> ? Right now it fails, since SQL9x asks that the char type defaults to a
> length of one and our parser does not distinguish between usage as a
> constant declaration and as a column definition (where you would want
> the "char(1)" to be filled in). But istm that for a constant string, the
> length should be whatever the string is, or unspecified.

Seems we should convert that to char(2). Not sure how difficult it is
to do though...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-07-12 17:14:56 Re: test data for query optimizer
Previous Message Neil Conway 2002-07-12 16:05:41 test data for query optimizer