Skip site navigation (1) Skip section navigation (2)

Re: Fix for tablename in targetlist

From: Michael Samuel <michael(at)miknet(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fix for tablename in targetlist
Date: 2001-05-23 23:25:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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(at)miknet(dot)net>

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2001-05-23 23:52:52
Subject: Re: [COMMITTERS] pgsql/src/bin/scripts Makefile
Previous:From: Don BaccusDate: 2001-05-23 23:24:48
Subject: Re: Plans for solving the VACUUM problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group