Skip site navigation (1) Skip section navigation (2)

Re: pg equivalent to MS SQL exec command

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Ugly Hippo <ugly_hippo(at)yahoo(dot)ca>, pgsql-novice(at)postgresql(dot)org
Subject: Re: pg equivalent to MS SQL exec command
Date: 2002-03-06 20:00:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

> I have moved a database from MS SQL to PG and am now
> trying to move my stored procedures.  I have created a
> PG function and am trying to figure out how to execute
> it without using a trigger.  In MS, I would type 'exec
> stored_procedure_name'.  Is there an equivalent in PG.
>  I have tried the 'execute' command but that seems to
> work only within a function.  I wish to execute this
> function when I feel like it, not on a fixed schedule.
>  Did I miss something in the documentation?

Use "SELECT function_name(params);"

In Postgres, EXECUTE is a PL/pgSQL command to execute arbitrary SQL


In response to

pgsql-novice by date

Next:From: Josh BerkusDate: 2002-03-06 20:19:03
Subject: Fun with SQL
Previous:From: Josh BerkusDate: 2002-03-06 17:09:14
Subject: Re: referential integrity for insert

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group