Re: using schema-qualified names in INSERTs

From: "John D(dot) Burger" <john(at)mitre(dot)org>
To: PostgreSQL-general general <pgsql-general(at)postgresql(dot)org>
Subject: Re: using schema-qualified names in INSERTs
Date: 2006-02-13 16:18:31
Message-ID: 859d286e42cbea6293467329814b4ef8@mitre.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> The list of columns can only apply to the table you've just named -
> that's the only thing that makes sense.

That's true for a SELECT from a single table, too, but the qualified
syntax is allowed there. Also, this is allowed:

# update testtab set b = testtab.b * 3;

But this isn't:

# update testtab set testtab.b = testtab.b * 3;

Arguably a tad inconsistent. I don't know what the OP's rationale was,
but I can imagine that allowing the syntax on INSERT might simplify the
generation of SQL in certain circumstances. There's also the Principle
of Least Surprise, etc.

- John D. Burger
MITRE

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Winter 2006-02-13 16:19:12 Re: Why does an ON SELECT rule have to be named "_RETURN"?
Previous Message Tom Lane 2006-02-13 14:50:57 Re: Dropping a database that does not exist