Re: Why No WHERE clause for INSERT statements

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: Maurice Gittens <mainmanmauricio(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Why No WHERE clause for INSERT statements
Date: 2010-08-17 14:12:41
Message-ID: 9F2C1385-A370-4E20-9D48-4272F33DA23B@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-08-17 14:13:19 Re: Why No WHERE clause for INSERT statements
Previous Message Ray Stell 2010-08-17 13:02:57 Re: How to do hot backup using postgres