Re: Passing values to a plpgsql functions

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Passing values to a plpgsql functions
Дата
Msg-id 013901c1c126$7f1d01d0$8201a8c0@inspiron
обсуждение исходный текст
Ответ на Passing values to a plpgsql functions  ("Jose Luis LG" <jlopezgonz@terra.es>)
Ответы Re: Passing values to a plpgsql functions  ("Jose Luis LG" <jlopezgonz@terra.es>)
Список pgsql-jdbc
Jose,
 
Postgres is slightly different than most databases in it's implementation of functions. What you need to do is put the function in a select as follows:
 
there is a builtin function called nextval('sequence') so you can "call" nextval like this
 
select nextval('sequence_name')
 
Note: the single quotes are necessary and it will return a column nextval in the resultset.
 
Dave 
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Jose Luis LG
Sent: Friday, March 01, 2002 4:18 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] Passing values to a plpgsql functions

Hello,

 

Can anybody help me?  How can I pass values to a plpgsql functions from jdbc.  I have tried the CallableStatement but this seems not to be implemented (Using Postgresql 7.2).  Is there any way of passing the values via Statement or PreparedStatement.  If this is not possible could someone tell me where I can find some examples doing this via the FastPath Api.

 

 

Thanks and best regards

 

 

 

Jose Luis

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

Предыдущее
От: tony
Дата:
Сообщение: single quotes
Следующее
От: "Nick Fankhauser"
Дата:
Сообщение: Re: strange error