Search Postgresql Archives

Re: execute if statement

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

 



On 01/12/2012 19:44, Peter Kroon wrote:
> Mmmmm.......
> 
> How do I execute dynamic sql that starts with an if statement.
> I'm converting mssql code to pgsql.
> 

Without trying it, I'd guess that you need to have the IF outside the
dynamic code, something like this:

  if .... then
    execute '.....';
  end if;

If you show what you're trying to achieve, someone might be able to
suggest something better.

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@xxxxxx


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