conditional execution of insert/update-s

Поиск
Список
Период
Сортировка
От Dmitry Teslenko
Тема conditional execution of insert/update-s
Дата
Msg-id 91325fec0901220015taad59a0v4d0e40056c9476a7@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hello!
Question is what's the easiest way to implement conditional execution
of insert/update-s via psql interface?

As far as I know there's following options:
1) create function in procedural language (plpgsql, for example);
then call that function
2) update ... where <conditon>; insert ... (select ... where <condition>);
not sure here if <condition> can be unrelated to the table being modified
by update/insert statement;

Are there alternatives?

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

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

Предыдущее
От: Igor Katson
Дата:
Сообщение: Re: [Plproxy-users] A complex plproxy query
Следующее
От: Kent Tong
Дата:
Сообщение: how to specify the locale that psql uses