Re: CASE WHEN foo IS NULL THEN DEFAULT ELSE foo END

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Bertheau ☭ <twanger(at)bluetwanger(dot)de>
Cc: PostgreSQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: CASE WHEN foo IS NULL THEN DEFAULT ELSE foo END
Date: 2005-06-03 14:16:34
Message-ID: 4626.1117808194@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <twanger(at)bluetwanger(dot)de> writes:
> is it planned to support the following insert syntax?

> INSERT INTO table VALUES (CASE WHEN arg_whatever IS NULL THEN DEFAULT
> ELSE arg_whatever END);

No. AFAICS, SQL99 only defines DEFAULT as the direct INSERT or UPDATE
target expression.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ami Ganguli 2005-06-03 14:44:59 using a selected row as a function parameter
Previous Message Tom Lane 2005-06-03 13:47:11 Re: 'true'::TEXT::BOOLEAN