X-Original-To: pgsql-php@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5C23D4762E0 for ; Fri, 28 Feb 2003 06:48:00 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 13380-10 for ; Fri, 28 Feb 2003 06:47:49 -0500 (EST) Received: from velli.mail.jippii.net (velli.mail.jippii.net [195.197.172.114]) by postgresql.org (Postfix) with ESMTP id AA781475F26 for ; Fri, 28 Feb 2003 01:00:29 -0500 (EST) Received: from bushido.intra.pretax.net (unknown [195.197.242.66]) by velli.mail.jippii.net (Postfix) with ESMTP id B826A232EE8; Fri, 28 Feb 2003 08:00:28 +0200 (EET) Subject: Re: PL/PGSQL From: Mauri Sahlberg To: Markus Post Cc: pgsql-php@postgresql.org In-Reply-To: <000101c2de8e$3b595df0$8100a8c0@lucky> References: <000101c2de8e$3b595df0$8100a8c0@lucky> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-jCC22yqQMr0R4Sd/v4EV" Organization: Pretax Systems Oy Message-Id: <1046412050.22290.10.camel@bushido.intra.pretax.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 28 Feb 2003 08:00:51 +0200 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/60 X-Sequence-Number: 1911 --=-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=3D0&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=E4=E4skyl=E4nrinne 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+pYmCS2wCnZQC6k8kDgCfYRH7 rAJqdywsMUsjkhIlA9nhEnM= =bRGi -----END PGP SIGNATURE----- --=-jCC22yqQMr0R4Sd/v4EV--