Re: insert into ... select ... and column order - Mailing list pgsql-general

From Tore Halset
Subject Re: insert into ... select ... and column order
Date
Msg-id F6D7BF01-0F41-43F6-A4AA-E6747A3AEA23@pvv.ntnu.no
Whole thread Raw
In response to Re: insert into ... select ... and column order  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-general
On Jan 15, 2008, at 12:16 , Albe Laurenz wrote:

> Because the SQL standard says so.
>
> ISO/IEC 9075-2, Chapter 14.8, Syntax Rule 9:
>
> "If the <insert column list> is omitted, then an <insert column list>
>  that identifies all columns of T in the ascending sequence of
>  their ordinal positions within T is implicit."
>
> You want an explicit <insert column list>:
>
> INSERT INTO dest_2
> (user_id, product_id, permit_start_date, permit_end_date)
> SELECT ...

Thanks to both of you for this answer.

  - Tore.

pgsql-general by date:

Previous
From: Hannes Dorbath
Date:
Subject: Segmentation fault with 8.3 FTS ISpell
Next
From: Alvaro Herrera
Date:
Subject: Re: Segmentation fault with 8.3 FTS ISpell