Re: [SQL] char type seems the same as char(1)

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, pgsql-sql(at)hub(dot)org
Subject: Re: [SQL] char type seems the same as char(1)
Date: 1998-12-13 20:35:15
Message-ID: 36742503.1EF0F10B@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> > Should I add this to the TODO list, that char is not char1 but has
> > 4-byte length?
> Well, Tom Lockhart responded that "it's not a bug, it's a feature".
> I still think it's broken --- and certainly the fact that quoting
> affects the result (char and "char" act differently) is not good.
> But the discussion seems to have died out without producing any
> definite plan of action.

Well, it is a feature, not a bug! Or at least is difficult to get
completely and transparently right given both that SQL92 has some
specific behaviors required of 'char' and 'char(1)' (they need to be
identical) and that we have a historical implementation and usage of
'char' as a one-byte-storage type.

But I'm working on reconciling pg_dump with the various ways to input
type names, and am looking at fixing code to address the specific bug
report regarding DEFAULT clauses. Some fixes will be possible with
v6.4.1, with perhaps more complete fixes available in v6.5. Give me a
few hours and I'll get back to you.

btw, it died out partly because the bug report gave an example (good)
but did not give a succinct statement of the problem (bad). I get *way*
too much e-mail on the Postgres list and a few others (I lurk on the
gnome list because they use the same sgml documentation tools) to catch
every report the way I should...

- Tom

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-12-14 00:24:41 Re: [SQL] char type seems the same as char(1)
Previous Message Bruce Momjian 1998-12-13 19:31:37 Re: [SQL] char type seems the same as char(1)