Re: Fix for tablename in targetlist - Mailing list pgsql-hackers

From Michael Samuel
Subject Re: Fix for tablename in targetlist
Date
Msg-id 20010524092509.B8759@miknet.net
Whole thread Raw
In response to Re: Fix for tablename in targetlist  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, May 19, 2001 at 10:50:31AM -0400, Tom Lane wrote:
> I had a thought this morning that raising an error may be the wrong
> thing to do.  We could instead choose to expand the name into
> "pg_class.*", which would take only a little more code and would
> arguably do something useful instead of useless.  (I suspect that the
> fjoin stuff that still remains in the backend was originally designed
> to support exactly this interpretation.)

This is almost certainly the wrong thing to do.  It would introduce
ambiguity to the syntax, that can only be error prone in the long run.

What happens if people put that kind of query in a view, or hard coded
into a program somewhere, then later decide to ALTER TABLE to add a
column by that name?

If somebody forgets the ".*", they should reasonably expect an error
message. (And, I would personally be annoyed if I didn't get one, and
instead my incorrect query went through)

-- 
Michael Samuel <michael@miknet.net>


pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: Plans for solving the VACUUM problem
Next
From: Don Baccus
Date:
Subject: Re: Plans for solving the VACUUM problem