Re: [HACKERS] Re: Arrays versus 'type constant' syntax

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: Arrays versus 'type constant' syntax
Date: 1999-07-14 21:58:21
Message-ID: 28261.931989501@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:
> Well, ahem, er...
> It isn't an explicit general construct in SQL92, since there are only
> a few data types defined in the language, and since type extensibility
> is not supported.
> However, the language does define syntax for specifying date/time
> literals (the only string-like literal which is not a string type) and
> that would seem to suggest the general solution.

Hmm. OK, then, we're stuck with a tradeoff that (fortunately) only
affects arrays. Is it better to force subscripted column names to be
fully qualified "table.column[subscripts]" (the current situation),
or to allow bare column names to be subscripted at the cost of requiring
casts from string constants to array types to use the long-winded CAST
notation (or nonstandard :: notation)?

I would guess that the cast issue comes up *far* less frequently than
subscripting, so we'd be better off changing the behavior. But the
floor is open for discussion.

I have this change implemented and tested here, btw, but I won't check
it in until I see if there are objections...

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-07-14 22:05:03 Re: [HACKERS] Counting bool flags in a complex query
Previous Message Thomas Lockhart 1999-07-14 21:25:36 Re: 6.5.1 release