Re: pg equivalent to MS SQL exec command

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: pg equivalent to MS SQL exec command
Дата
Msg-id web-819021@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на pg equivalent to MS SQL exec command  (Ugly Hippo <ugly_hippo@yahoo.ca>)
Список pgsql-novice
Troy,

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

-Josh

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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: referential integrity for insert
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Fun with SQL