Re: [GENERAL] Updating column on row update

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: [GENERAL] Updating column on row update
Дата
Msg-id 4B0BC02D020000250002CC20@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: [GENERAL] Updating column on row update  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: [GENERAL] Updating column on row update
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> wrote:

> Part of the motivation for allowing inline blocks was to allow for
> conditional logic. So you can do things like:
>
>   DO $$
>
>   begin
>       if not exists (select 1 from pg_tables
>                      where schemaname = 'foo'
>                      and tablename = 'bar') then
>            create table foo.bar (x int, y text);
>       end if;
>   end;
>
>   $$;
>
>
> It's a bit more verbose (maybe someone can streamline it) but it
> does give you CINE (for whatever flavor of CINE you want), as well
> as lots more complex possibilities than we can conceivably build
> into SQL.

So we're conceding that this is a valid need and people will now have
a way to meet it.  Is the argument against having CINE syntax that it
would be more prone to error than the above, or that the code would be
so large and complex as to create a maintenance burden?  (Is there
some other reason I'm missing?)

-Kevin

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hitoshi Harada
Дата:
Сообщение: Syntax conflicts in frame clause
Следующее
От: Oleg Bartunov
Дата:
Сообщение: garbage in psql -l