Re: [HACKERS] Beta for 4:30AST ... ? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Beta for 4:30AST ... ?
Date
Msg-id Pine.GSO.4.02A.10003011606090.25449-100000@Svan.DoCS.UU.SE
Whole thread Raw
In response to Re: [HACKERS] Beta for 4:30AST ... ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 1 Mar 2000, Tom Lane wrote:

> Right.  I think what Peter is actually suggesting is that BIT VARYING
> (which must be special-cased in gram.y) could be equivalent to
> "bit varying" (as a quoted identifier, that works already in most
> places, and arguably should work everywhere).  There's a certain amount
> of intellectual cleanliness in that.

{Grin} That's exactly what I wanted.

> OTOH, it's not apparent that it's really any *better* than `varbit' or
> your choice of other space-free internal names.

It's better because then you don't need any special casing when you
provide the type back to the client. And it's better because you don't
need to remember that "foo" is really "bar" internally. And it's better
because it wouldn't disallow users from defining "varbit" themselves with
the non-obvious error message that it already exists. (Okay, the last is a
weak reason, but it is one.) Finally, it's better because it already
works, with only a minor change in the bootstrap scanner necessary.

> If SQL92 were a moving target then I'd be concerned about having to
> track the special cases in a lot of bits of code ... but it's not
> a moving target.

But PostgreSQL is a moving target in all regards. Where would you want to
do the endless internal/external type conversions on the way to the
client. In pg_dump? In psql? In libpq? In the server communications code?
Make a view around pg_type? How about nowhere and we just do the above?

Special cases suck. ;)

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Where's the SQL3 spec?
Next
From: "Kardos, Dr. Andreas"
Date:
Subject: Re: [HACKERS] Where's the SQL3 spec?