Re: using schema-qualified names in INSERTs

From: Richard Huxton <dev(at)archonet(dot)com>
To: Frank Church <pgsql(at)adontendev(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: using schema-qualified names in INSERTs
Date: 2006-02-13 13:55:20
Message-ID: 43F08FC8.50501@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank Church wrote:
> Does PostgreSQL support INSERT syntax of this kind -
>
> insert into table (table.col1, table.col2, table.col3) values('one', 'two',
> 'three')?
>
> Trying it out generates an error. It works when the 'table' bit is removed from
> the column names.

What would this do for you? What would it mean if I wrote?
INSERT INTO table1 (table2.col1, table3.col2) VALUES (...)

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

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-02-13 14:35:36 Re: Dropping a database that does not exist
Previous Message Martijn van Oosterhout 2006-02-13 13:39:15 Re: using schema-qualified names in INSERTs