X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C8FF8474E5C for ; Sat, 22 Feb 2003 19:59:05 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 58987-09 for ; Sat, 22 Feb 2003 19:58:55 -0500 (EST) Received: from luckydigital.com (www.luckydigital.com [203.109.157.4]) by postgresql.org (Postfix) with ESMTP id 784D7474E4F for ; Sat, 22 Feb 2003 19:58:54 -0500 (EST) Received: from jax (203-109-198-1.akl.ihugultra.co.nz [203.109.198.1]) by luckydigital.com (8.11.6/8.10.0) with SMTP id h1N0wuC10937 for ; Sun, 23 Feb 2003 13:58:56 +1300 Message-ID: <002f01c2dad6$c03bb470$c900a8c0@jax> From: "James Cooper" To: "sql" Subject: sql question after upgrade Date: Sun, 23 Feb 2003 13:58:59 +1300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002C_01C2DB43.B6CB8C40" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/503 X-Sequence-Number: 11901 This is a multi-part message in MIME format. ------=_NextPart_000_002C_01C2DB43.B6CB8C40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi just upgraded to 7.3.2 and imported my db schema with no probs! Just wondering... why VOLATILE is being appended to my functions - can anyo= ne ansewer me what this means? - should i be using joins instead, does this= make a difference? If so an example of this would be much appreciated!! CREATE FUNCTION public.get_people_total(int4) RETURNS int8 AS ' select count(person_id) as total from person where person_id IN ( select cp.person_id from cluster_person cp, cluster c where cp.cluster_id = =3D c.cluster_id and c.c_id =3D $1 group by cp.person_id=20 ); ' LANGUAGE 'sql' VOLATILE; cheers all James ------=_NextPart_000_002C_01C2DB43.B6CB8C40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi just upgraded to 7.3.2 and imported my db= schema=20 with no probs!

Just wondering... why VOLATILE is being appe= nded to=20 my functions - can anyone ansewer me what this means? - should i be using j= oins=20 instead, does this make a difference? If so an example of this would be muc= h=20 appreciated!!

CREATE FUNCTION public.get_people_total(int4= ) RETURNS=20 int8 AS '
select count(person_id) as total from person where person_id= =20 IN
(
select cp.person_id from cluster_person cp, cluster c where=20 cp.cluster_id =3D c.cluster_id and c.c_id =3D $1 group by cp.person_id
= );
'=20 LANGUAGE 'sql' VOLATILE;

 

cheers all

James

------=_NextPart_000_002C_01C2DB43.B6CB8C40--