Search Postgresql Archives

conditional execution of insert/update-s

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux