Tom Lane writes:

On a lesser note: I tried "select * into temp from hits" as per the doco,
but it barfs.
Postgres thinks that TEMP is a keyword, so it won't take it as a table
name unless you put quotes around it.
This is really an unfortunate case where someone should have read the SQL
standard before putting in a feature. The SQL keyword is TEMPORARY, and
TEMP is really a popular name for a dummy table.

I tried making TEMP a ColId but it croaks on this syntactic contruct:

SELECT xxx INTO [TEMP] [TABLE] tablename

which is incidentally not SQL either. If someone is interested in allowing
'temp' as an identifier, there doesn't seem to be a good way without
requiring the TABLE keyword above. Would that be worth it for 7.0 maybe?

Of course the documentation should be changed to TEMPORARY as well in
various places.

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

Search Discussions

  • Thomas Lockhart at Feb 29, 2000 at 5:38 am

    Postgres thinks that TEMP is a keyword, so it won't take it as a table
    name unless you put quotes around it.
    This is really an unfortunate case where someone should have read the SQL
    standard before putting in a feature. The SQL keyword is TEMPORARY, and
    TEMP is really a popular name for a dummy table.
    So why not yank TEMP and require TEMPORARY? Saving an extra 5
    characters of typing is not a good enough reason to keep it imho, and
    if the SQL92 standard requires a particular form why bother extending
    it?

    A major release is a good time to adjust syntax to promote
    compliance...

    - Thomas

    --
    Thomas Lockhart lockhart@alumni.caltech.edu
    South Pasadena, California
  • Tom Lane at Feb 29, 2000 at 5:44 am

    Thomas Lockhart writes:
    This is really an unfortunate case where someone should have read the SQL
    standard before putting in a feature. The SQL keyword is TEMPORARY, and
    TEMP is really a popular name for a dummy table.
    So why not yank TEMP and require TEMPORARY?
    Probably we ought to stop to ask why TEMP is in there to begin with;
    perhaps for compatibility with some other RDBMS?

    If not, I'd vote for pulling it out. That's a heck of a poor word to
    reserve.

    regards, tom lane
  • Peter Eisentraut at Feb 29, 2000 at 10:54 am

    On Tue, 29 Feb 2000, Thomas Lockhart wrote:

    Postgres thinks that TEMP is a keyword, so it won't take it as a table
    name unless you put quotes around it.
    This is really an unfortunate case where someone should have read the SQL
    standard before putting in a feature. The SQL keyword is TEMPORARY, and
    TEMP is really a popular name for a dummy table.
    So why not yank TEMP and require TEMPORARY? Saving an extra 5
    characters of typing is not a good enough reason to keep it imho, and
    if the SQL92 standard requires a particular form why bother extending
    it?

    A major release is a good time to adjust syntax to promote
    compliance...
    I've been (lightly) bashed in the past for proposing such things (see
    END/ABORT) but I'm with you. I think that TEMP may be far too wide-spread
    by now, though.

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedFeb 28, '00 at 11:16p
activeFeb 29, '00 at 10:54a
posts4
users4
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase