Обсуждение: JDBC + PL/pgSQL ?
Dear JDBC people,
I have a very simple question; is it possible to write a PL/pgSQL
procedure and execute it through JDBC's Statement.execute() method? Thanks
for your time. :)
Daryl, Yes, just do a select procedurename(); Dave On Wed, 2002-06-26 at 13:43, Daryl Beattie wrote: > Dear JDBC people, > > I have a very simple question; is it possible to write a PL/pgSQL > procedure and execute it through JDBC's Statement.execute() method? Thanks > for your time. :) > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > > >
Dear Dave and JDBC people,
Hi, I must apologize for not being entirely clear (truth is, I hit
Ctrl+Enter in Outlook before I was finished typing).
What I mean is; is it possible to create a Statement from a String
which contains PL/pgSQL code, and then execute that Statement. Thus, the
PL/pgSQL procedure is not stored in the database, but is being called
through the JDBC connection.
I know that in Oracle you can do this with their PL/SQL code, I was
just wondering if the PostgreSQL JDBC driver also supports this.
Thanks for your help. Sorry for the incomplete e-mail the first
time.
Sincerely,
Daryl.
> -----Original Message-----
> From: Dave Cramer [mailto:Dave@micro-automation.net]
> Sent: Wednesday, June 26, 2002 4:54 PM
> To: Daryl Beattie
> Cc: pgsql-jdbc@postgresql.org
> Subject: Re: [JDBC] JDBC + PL/pgSQL ?
>
>
> Daryl,
>
> Yes, just do a select procedurename();
>
> Dave
> On Wed, 2002-06-26 at 13:43, Daryl Beattie wrote:
> > Dear JDBC people,
> >
> > I have a very simple question; is it possible to write
> a PL/pgSQL
> > procedure and execute it through JDBC's Statement.execute()
> method? Thanks
> > for your time. :)
> >
> >
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org
> >
> >
> >
>
>
>
Hi Daryl,
I don't know of a way to execute PL/pgSQL code without creating a PL/pgSQL function.
But you can create a function through the JDBC connection using Statement.execute("create function ....")
Joachim
Daryl Beattie wrote:
I don't know of a way to execute PL/pgSQL code without creating a PL/pgSQL function.
But you can create a function through the JDBC connection using Statement.execute("create function ....")
Joachim
Daryl Beattie wrote:
Dear Dave and JDBC people,
Hi, I must apologize for not being entirely clear (truth is, I hit
Ctrl+Enter in Outlook before I was finished typing).
What I mean is; is it possible to create a Statement from a String
which contains PL/pgSQL code, and then execute that Statement. Thus, the
PL/pgSQL procedure is not stored in the database, but is being called
through the JDBC connection.
I know that in Oracle you can do this with their PL/SQL code, I was
just wondering if the PostgreSQL JDBC driver also supports this.
Thanks for your help. Sorry for the incomplete e-mail the first
time.
Sincerely,
Daryl.-----Original Message-----
From: Dave Cramer [mailto:Dave@micro-automation.net]
Sent: Wednesday, June 26, 2002 4:54 PM
To: Daryl Beattie
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] JDBC + PL/pgSQL ?
Daryl,
Yes, just do a select procedurename();
Dave
On Wed, 2002-06-26 at 13:43, Daryl Beattie wrote:Dear JDBC people,
I have a very simple question; is it possible to writea PL/pgSQLprocedure and execute it through JDBC's Statement.execute()method? Thanksfor your time. :)
---------------------------(end ofbroadcast)---------------------------TIP 1: subscribe and unsubscribe commands go tomajordomo@postgresql.org
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html