Search Postgresql Archives

Scripting issues

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

 



Hi

I come from a MSSQL background and am trying to figure out how to write
deployment scripts for PostgreSQL. Typically, if I want to drop a
function, I would write a script that first checks for it's existence and
then performs the drop.

In MSSQL it would be as easy as (this can be done in native TSQL):
IF EXISTS (...some query to system tables...)
  DROP function XXX

However, I am really strugling to understand how to do this in PostgreSQL.
It seem the standard SQL language doesn't support the IF statement.

All the development that I do needs to be deployed in a script fashion and
generally I need to check for the existence of an object before replacing
or dropping.

Any help will be much appreciated.

Thanks
Craig

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[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