Re: [SQL] char type seems the same as char(1) - Mailing list pgsql-sql

From Thomas G. Lockhart
Subject Re: [SQL] char type seems the same as char(1)
Date
Msg-id 36745AC9.3EF6DB74@alumni.caltech.edu
Whole thread Raw
In response to Re: [SQL] char type seems the same as char(1)  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [SQL] char type seems the same as char(1)
List pgsql-sql
> > 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.

OK, I've committed changes to *both* trees prompted by the problems with
handling the single-byte character type.

One set of changes removes the double quotes from most data type fields
in pg_dump (they aren't really legal there in the SQL92 sense anyway).
pg_dump now writes "character" and "character varying" for the Postgres
internal types "bpchar" and "varchar" to be more compatible with
standard usage.

Another set of changes modifies the type matching for DEFAULT statements
to use the recently implemented implicit type coersion techniques. More
permutations of DEFAULT clauses should now be legal and handled.

Please test this stuff! Especially if you are set up to test the REL6_4
tree since I've done all testing on the main development tree.

btw, all regression tests pass on my machine.

> If we use char1 for internal tables, we should allow it externally, if
> only as char1.  I will add it to the TODO list.

As what?

                     - Tom

pgsql-sql by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [SQL] char type seems the same as char(1)
Next
From: Bruce Momjian
Date:
Subject: Re: [SQL] char type seems the same as char(1)