Обсуждение: CASE WHEN foo IS NULL THEN DEFAULT ELSE foo END

Поиск
Список
Период
Сортировка

CASE WHEN foo IS NULL THEN DEFAULT ELSE foo END

От
Markus Bertheau ☭
Дата:
Hi,

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);

I have the DEFAULT inside the CASE expression in mind.

Markus
-- 
Markus Bertheau ☭ <twanger@bluetwanger.de>



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

От
Tom Lane
Дата:
Markus Bertheau ☭ <twanger@bluetwanger.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