Re: Why No WHERE clause for INSERT statements - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: Why No WHERE clause for INSERT statements
Date
Msg-id 9F2C1385-A370-4E20-9D48-4272F33DA23B@seespotcode.net
Whole thread Raw
In response to Why No WHERE clause for INSERT statements  (Maurice Gittens <mainmanmauricio@gmail.com>)
List pgsql-general
On Aug 17, 2010, at 4:32 , Maurice Gittens wrote:

> More specifically; the INSERT statement is currently defined as:
>
> INSERT INTO table [ ( column [, ...] ) ]
>    { DEFAULT VALUES | VALUES ( { expression | DEFAULT } [, ...] ) [,
> ...] | query }
        ^^^^^

INSERT INTO table [ ( column [, ...] ) ]
  SELECT ...
    WHERE condition

> This syntax would allow tuples to be inserted only when some condition is true.
> What I am missing?

See above.

Michael Glaesemann
grzm seespotcode net




pgsql-general by date:

Previous
From: Maurice Gittens
Date:
Subject: Why No WHERE clause for INSERT statements
Next
From: Tom Lane
Date:
Subject: Re: Why No WHERE clause for INSERT statements