PL/PGSQL
am 27.02.2003 19:29:57 von Markus Post
Hello together!
I have a little question, because I found the answer nowhere in the Net.
How I can call a stored pl/pgsql-function from my SQL-Client.
In an SQL-statement I call it like "select MYFUNCTION(blah, blah) from
....".
I need it without the SQL-Statement.
In Oracle I would be:
BEGIN
MYFUNCTION(...);
END;
How can I do this with PG?
Greets,
Markus
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
Re: PL/PGSQL
am 28.02.2003 07:00:51 von Mauri Sahlberg
--=-jCC22yqQMr0R4Sd/v4EV
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hello,
On to, 2003-02-27 at 20:29, Markus Post wrote:
> Hello together!
>=20
> I have a little question, because I found the answer nowhere in the Net.
> How I can call a stored pl/pgsql-function from my SQL-Client.
> In an SQL-statement I call it like "select MYFUNCTION(blah, blah) from
> ...".
> I need it without the SQL-Statement.
>=20
> In Oracle I would be:
> BEGIN
> MYFUNCTION(...);
> END;
>=20
You're probably looking from the wrong place. At least the answer can be
found from
http://www.postgresql.org/docs/view.php?version=3D7.3&idoc=3 D0&file=3Dplpgs=
ql-statements.html
On that page, heading 19.5.3 states that you can do:
PERFORM MYFUNCTION(...);=20
if you wish to discard the return value.=20
Or if your function returns something then you do:
myresult:=3DMYFUNCTION(...);
Regards,
--=20
Development Manager, B.SC | This message is probably digitally=20
Pretax Systems Oy | signed as well. Contact me to obtain my
Pääskylänrinne 8, | public key.
FIN-00500-Helsinki, Finland | This signature has performed an illegal
+358 9 6155 3252 | operation and will be terminated...
--=-jCC22yqQMr0R4Sd/v4EV
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+XvsSocZwJYwv4fYRAqWZAJ49oI7fx/i+pYmCS2wCnZQC6k8kDgCf YRH7
rAJqdywsMUsjkhIlA9nhEnM=
=bRGi
-----END PGP SIGNATURE-----
--=-jCC22yqQMr0R4Sd/v4EV--