How to call a stored procedure in PostgreSQL

Поиск
Список
Период
Сортировка
Искать

How to call a stored procedure in PostgreSQL

От:
"Joost Kraaijeveld" <J.Kraaijeveld@Askesis.nl>
Дата:
Hi all,

How do I call a stored procedure in PostgreSQL? I tried "call procedure-name (arg 1, arg2)" but that does not seem to work...

Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl 

Re: How to call a stored procedure in PostgreSQL

От:
markw@mohawksoft.com
Дата:
> Hi all,
>
> How do I call a stored procedure in PostgreSQL? I tried "call
> procedure-name (arg 1, arg2)" but that does not seem to work...

select procedure-name(arg1, arg2);

>
> Groeten,
>
> Joost Kraaijeveld
> Askesis B.V.
> Molukkenstraat 14
> 6524NB Nijmegen
> tel: 024-3888063 / 06-51855277
> fax: 024-3608416
> e-mail: J.Kraaijeveld@Askesis.nl
> web: www.askesis.nl
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>

Re: How to call a stored procedure in PostgreSQL

От:
"Joshua D. Drake" <jd@commandprompt.com>
Дата:
Вложения:
Joost Kraaijeveld wrote:
> Hi all,
> 
> How do I call a stored procedure in PostgreSQL? I tried "call procedure-name (arg 1, arg2)" but that does not seem to work...

select procedure(arg1,arg2)

or

select * from procedure(arg1,arg2)

depending on the type.

Sincerely,

Joshua D. Drake


> 
> Groeten,
> 
> Joost Kraaijeveld
> Askesis B.V.
> Molukkenstraat 14
> 6524NB Nijmegen
> tel: 024-3888063 / 06-51855277
> fax: 024-3608416
> e-mail: J.Kraaijeveld@Askesis.nl
> web: www.askesis.nl 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
>                http://archives.postgresql.org


-- 
Command Prompt, Inc., your source for PostgreSQL replication,
professional support, programming, managed services, shared
and dedicated hosting. Home of the Open Source Projects plPHP,
plPerlNG, pgManage,  and pgPHPtoolkit.
Contact us now at: +1-503-667-4564 - http://www.commandprompt.com

Re: How to call a stored procedure in PostgreSQL

От:
"Greg Campbell" <greg.campbell@us.michelin.com>
Дата:
Вложения:
Try "SELECT procedure-name(arg1, arg2)" as if it were a SELECT or INSERT 
or UPDATE statement.
For example
if I have function named calc_square(int)
I could use "SELECT calc_square(2);"


Joost Kraaijeveld wrote:

>Hi all,
>
>How do I call a stored procedure in PostgreSQL? I tried "call procedure-name (arg 1, arg2)" but that does not seem to work...
>
>Groeten,
>
>Joost Kraaijeveld
>Askesis B.V.
>Molukkenstraat 14
>6524NB Nijmegen
>tel: 024-3888063 / 06-51855277
>fax: 024-3608416
>e-mail: J.Kraaijeveld@Askesis.nl
>web: www.askesis.nl 
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>               http://archives.postgresql.org
>  
>

Re: How to call a stored procedure in PostgreSQL

От:
"Greg Campbell" <greg.campbell@us.michelin.com>
Дата:
Вложения:
Addendum
"SELECT procedure_name(arg1, arg2)" for NON-select non-data returning 
queries
"SELECT * FROM procedure_name(arg1, arg2)" for SELECT queries

Joost Kraaijeveld wrote:

>Hi all,
>
>How do I call a stored procedure in PostgreSQL? I tried "call procedure-name (arg 1, arg2)" but that does not seem to work...
>
>Groeten,
>
>Joost Kraaijeveld
>Askesis B.V.
>Molukkenstraat 14
>6524NB Nijmegen
>tel: 024-3888063 / 06-51855277
>fax: 024-3608416
>e-mail: J.Kraaijeveld@Askesis.nl
>web: www.askesis.nl 
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>               http://archives.postgresql.org
>  
>
FAQ