From tiberiu@akela.ro Thu Jun 24 10:25:03 1999 Received: from ns.canad.ro (IDENT:root@ns.canad.ro [193.230.177.1]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA65594 for ; Thu, 24 Jun 1999 06:25:03 -0400 (EDT) (envelope-from tiberiu@akela.ro) Received: from ns (root@ns.akela.ro [193.226.47.105]) by ns.canad.ro (8.9.3/8.9.3) with ESMTP id NAA05818 for ; Thu, 24 Jun 1999 13:23:50 +0300 Received: from tibi (tibi.akela.ro [192.168.1.2]) by ns (8.9.1/8.9.1) with SMTP id NAA18474 for ; Thu, 24 Jun 1999 13:24:10 -0200 Message-ID: <010101bebe2b$62327e20$0201a8c0@tibi.akela.ro> From: "Tiberiu Craciun" To: Subject: problem with PL/pgSQL Date: Thu, 24 Jun 1999 13:21:54 +0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00FE_01BEBE44.87135FC0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 This is a multi-part message in MIME format. ------=_NextPart_000_00FE_01BEBE44.87135FC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have a table and a function defined like that : create table trafic (=20 statie text,=20 traf_in int8 default 0, traf_out int8 default 0 ); create function addtrafic (text, int8, int2) returns int2 as ' declare=20 statia alias for $1 ; traficul alias for $2 ; directia alias for $3 ; begin select * from trafic where statie=3D $1; if not found then insert into trafic (statie) values( $1 ); endif; if $3 < 1 then update trafic set traf_in=3Dtraf_in+ $2 where statie=3D = $1; else update trafic set traf_out=3Dtraf_out+ $2 where = statie=3D $1; endif; return $3 ; end; ' language 'plpgsql'; when I run this SQL : select addtrafic('station1',10,0) as test; I got an error like that : NOTICE: plpgsql: ERROR during compile of addtrafic near line 20 ERROR: parse error at or near ";" and i don't know what is wrong, can someone help me ? ------=_NextPart_000_00FE_01BEBE44.87135FC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I have a table and a function defined like that = :
 
create table trafic (
    statie = text,=20
    traf_in int8 default 0,
    = traf_out=20 int8 default 0
);
 
create function addtrafic (text, int8, int2) returns = int2 as=20 '
    declare=20
         statia alias for $1 = ;
         traficul alias for = $2=20 ;
         directia alias for = $3=20 ;
   =20 begin
         select * from = trafic=20 where statie=3D $1;
         = if not=20 found=20 then
           = ;     =20 insert into trafic (statie) values( $1=20 );
        =20 endif;
         if $3 < 1=20 then
           = ;     =20 update trafic set traf_in=3Dtraf_in+ $2 where statie=3D=20 $1;
        =20 else
           = ;     =20 update trafic set traf_out=3Dtraf_out+ $2 where statie=3D=20 $1;
        =20 endif;
         return $3=20 ;
    end;
' language 'plpgsql'
;
 
 when I run this SQL = :
 
select addtrafic('station1',10,0) as = test;
 
I got an error like that = :
 
NOTICE: plpgsql: ERROR during = compile of=20 addtrafic near line 20
ERROR: parse error at or near=20 ";"
 
and i don't know what is wrong, can = someone help=20 me ?
------=_NextPart_000_00FE_01BEBE44.87135FC0-- From basier@ipgp.jussieu.fr Thu Jun 24 11:53:10 1999 Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by hub.org (8.9.3/8.9.3) with ESMTP id HAA04675 for ; Thu, 24 Jun 1999 07:53:10 -0400 (EDT) (envelope-from basier@ipgp.jussieu.fr) Received: from toutatis.ipgp.jussieu.fr (root@toutatis.ipgp.jussieu.fr [134.157.26.27]) by shiva.jussieu.fr (8.9.3/jtpda-5.3.1) with ESMTP id NAA05123 ; Thu, 24 Jun 1999 13:52:01 +0200 (CEST) Received: from sismo1.ipgp.jussieu.fr (sismo1.ipgp.jussieu.fr [134.157.27.131]) by toutatis.ipgp.jussieu.fr (8.9.2/jtpda-5.3.1) with ESMTP id NAA18903 ; Thu, 24 Jun 1999 13:49:03 +0200 (MET DST) Received: from ipgp.jussieu.fr (geosp5 [134.157.27.5]) by sismo1.ipgp.jussieu.fr (8.8.8/jtpda-5.2) with ESMTP id NAA22828 ; Thu, 24 Jun 1999 13:53:16 +0200 (MET DST) Sender: basier@ipgp.jussieu.fr Message-ID: <37721BDE.9EF8D903@ipgp.jussieu.fr> Date: Thu, 24 Jun 1999 13:51:59 +0200 From: Eric BASIER X-Mailer: Mozilla 4.02 [en] (X11; I; SunOS 5.6 sun4m) MIME-Version: 1.0 To: Tiberiu Craciun CC: pgsql-sql@hub.org Subject: Re: [SQL] problem with PL/pgSQL References: <010101bebe2b$62327e20$0201a8c0@tibi.akela.ro> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I insert my response in your text Tiberiu Craciun wrote: > I have a table and a function defined like that : create table trafic > ( > statie text, > traf_in int8 default 0, > traf_out int8 default 0 > ); create function addtrafic (text, int8, int2) returns int2 as ' > declare > statia alias for $1 ; > traficul alias for $2 ; > directia alias for $3 ; > begin > select * from trafic where statie= $1; > if not found then > insert into trafic (statie) values( $1 ); there is an error here ^ the good sentence is : insert into trafic (statie) values ($1) ; > endif; > if $3 < 1 then > update trafic set traf_in=traf_in+ $2 where statie= > $1; > else > update trafic set traf_out=traf_out+ $2 where statie= > $1; > endif; > return $3 ; > end; > ' language 'plpgsql'; when I run this SQL : select > addtrafic('station1',10,0) as test; I got an error like that : NOTICE: > plpgsql: ERROR during compile of addtrafic near line 20ERROR: parse > error at or near ";" and i don't know what is wrong, can someone help > me ? -- Basier Eric e-mail : basier@ipgp.jussieu.fr http://geoscope.ipgp.jussieu.fr IPGP Observatoires Sismologie-Volcanologie 4,Place Jussieu 75005 Paris Tour 24-14 4eme Etage Tel 01 44 27 38 96 From jose@sferacarta.com Thu Jun 24 13:08:50 1999 Received: from bologna.nettuno.it (bologna.nettuno.it [193.43.2.1]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA21398 for ; Thu, 24 Jun 1999 09:08:50 -0400 (EDT) (envelope-from jose@sferacarta.com) Received: from proxy.sferacarta.com (mail@sfcabop1.nettuno.it [193.207.10.213]) by bologna.nettuno.it (8.8.6/8.8.8/NETTuno 3.2) with ESMTP id PAA21739; Thu, 24 Jun 1999 15:08:24 +0200 (MDT) Received: from rosso.sferacarta.com (sferacarta.com) [10.20.30.5] by proxy.sferacarta.com with esmtp (Exim 2.05 #1 (Debian)) id 10xAF2-0000vR-00; Thu, 24 Jun 1999 14:12:36 +0000 Message-ID: <37721FD7.9947A3A1@sferacarta.com> Date: Thu, 24 Jun 1999 14:08:56 +0200 From: =?iso-8859-1?Q?Jos=E9?= Soares X-Mailer: Mozilla 4.5 [it] (Win95; I) X-Accept-Language: it MIME-Version: 1.0 To: Tiberiu Craciun CC: pgsql-sql@hub.org Subject: Re: [SQL] problem with PL/pgSQL References: <010101bebe2b$62327e20$0201a8c0@tibi.akela.ro> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Your function have some bugs; 1) The parser doesn't understand keywords like ENDIF but END IF (two words) 2) You must to use keyword INTO with the select command try this one instead: create function addtrafic (text, int8, int2) returns int2 as ' declare boo text; statia alias for $1 ; traficul alias for $2 ; directia alias for $3 ; begin select statie from trafic into boo where statie= $1; if not found then insert into trafic (statie) values( $1 ); end if; if $3 < 1 then update trafic set traf_in=traf_in+ $2 where statie= $1; else update trafic set traf_out=traf_out+ $2 where statie= $1; end if; return $3 ; end; ' language 'plpgsql'; Tiberiu Craciun ha scritto: > Part 1.1 Type: Plain Text (text/plain) > Encoding: quoted-printable -- ______________________________________________________________ PostgreSQL 6.5.0 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Jose' From tiberiu@akela.ro Thu Jun 24 13:14:01 1999 Received: from ns.canad.ro (IDENT:root@ns.canad.ro [193.230.177.1]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA22882 for ; Thu, 24 Jun 1999 09:14:01 -0400 (EDT) (envelope-from tiberiu@akela.ro) Received: from ns (root@ns.akela.ro [193.226.47.105]) by ns.canad.ro (8.9.3/8.9.3) with ESMTP id QAA10286; Thu, 24 Jun 1999 16:12:34 +0300 Received: from tibi (tibi.akela.ro [192.168.1.2]) by ns (8.9.1/8.9.1) with SMTP id QAA21658; Thu, 24 Jun 1999 16:12:37 -0200 Message-ID: <013501bebe42$ea71d440$0201a8c0@tibi.akela.ro> From: "Tiberiu Craciun" To: "Eric BASIER" Cc: Subject: Re:Re: [SQL] problem with PL/pgSQL Date: Thu, 24 Jun 1999 16:10:21 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 I don't think that is, because the error is still there. -----Original Message----- From: Eric BASIER To: Tiberiu Craciun Cc: pgsql-sql@hub.org Date: jeudi 24 juin 1999 19:51 Subject: Re: [SQL] problem with PL/pgSQL >I insert my response in your text >Tiberiu Craciun wrote: > >> I have a table and a function defined like that : create table trafic >> ( >> statie text, >> traf_in int8 default 0, >> traf_out int8 default 0 >> ); create function addtrafic (text, int8, int2) returns int2 as ' >> declare >> statia alias for $1 ; >> traficul alias for $2 ; >> directia alias for $3 ; >> begin >> select * from trafic where statie= $1; >> if not found then >> insert into trafic (statie) values( $1 ); > > there is an error here ^ >the good sentence is : insert into trafic (statie) values ($1) ; > > > >> endif; >> if $3 < 1 then >> update trafic set traf_in=traf_in+ $2 where statie= >> $1; >> else >> update trafic set traf_out=traf_out+ $2 where statie= >> $1; >> endif; >> return $3 ; >> end; >> ' language 'plpgsql'; when I run this SQL : select >> addtrafic('station1',10,0) as test; I got an error like that : NOTICE: >> plpgsql: ERROR during compile of addtrafic near line 20ERROR: parse >> error at or near ";" and i don't know what is wrong, can someone help >> me ? > > > >-- >Basier Eric e-mail : basier@ipgp.jussieu.fr >http://geoscope.ipgp.jussieu.fr >IPGP Observatoires Sismologie-Volcanologie >4,Place Jussieu 75005 Paris Tour 24-14 4eme Etage Tel 01 44 27 38 96 > > > From vlady@school.digsys.bg Tue Feb 8 13:46:24 2000 Received: from danbo.digsys.bg (root@danbo.digsys.bg [192.92.129.10]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA33642 for ; Tue, 8 Feb 2000 08:46:24 -0500 (EST) (envelope-from vlady@lorna.digsys.bg) Received: from lorna.digsys.bg (root@lorna.digsys.bg [193.68.6.15]) by danbo.digsys.bg (8.9.0/8.9.0) with ESMTP id PAA17227 for ; Tue, 8 Feb 2000 15:46:16 +0200 (EET) Received: from lorna.digsys.bg (vlady@localhost.digsys.bg [127.0.0.1]) by lorna.digsys.bg (8.9.0/8.9.0) with ESMTP id PAA11001 for ; Tue, 8 Feb 2000 15:46:15 +0200 (EET) Message-Id: <200002081346.PAA11001@lorna.digsys.bg> X-Mailer: exmh version 2.0.2 2/24/98 To: pgsql-sql@postgresql.org From: "Vladimir Terziev" Subject: Problem with PL/pgSQL Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 08 Feb 2000 15:46:14 +0200 Sender: vlady@digsys.bg Hi I try to create the next function: create function ttt() RETURNS OPAQUE AS ' BEGIN RAISE EXCEPTION "Hello" END' language 'plpgsql'; The result is: ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'. Recognized languages are sql, C, internal and the created procedural languages. I have postgres SQL ver. 6.5.2. What's going on? Vladimir From vince@nycrc.net Tue Feb 8 14:09:53 2000 Received: from smtp25.baruch.cuny.edu (smtp25.baruch.cuny.edu [150.210.155.201]) by hub.org (8.9.3/8.9.3) with SMTP id JAA39055 for ; Tue, 8 Feb 2000 09:09:53 -0500 (EST) (envelope-from vince@baruch.cuny.edu) Received: (qmail 4221 invoked by uid 0); 8 Feb 2000 14:00:30 -0000 Received: from newton.baruch.cuny.edu (HELO baruch.cuny.edu) (150.210.155.202) by smtp25.baruch.cuny.edu with SMTP; 8 Feb 2000 14:00:30 -0000 Received: (qmail 2814 invoked by uid 1000); 8 Feb 2000 14:09:47 -0000 Date: Tue, 8 Feb 2000 09:09:47 -0500 From: Vince Gonzalez To: Vladimir Terziev Cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Problem with PL/pgSQL Message-ID: <20000208090947.A31471@newton.baruch.cuny.edu> References: <200002081346.PAA11001@lorna.digsys.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <200002081346.PAA11001@lorna.digsys.bg>; from vlady@school.digsys.bg on Tue, Feb 08, 2000 at 03:46:14PM +0200 On Tue, Feb 08, 2000 at 03:46:14PM +0200, Vladimir Terziev wrote: > I try to create the next function: > The result is: > ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'. > Recognized languages are sql, C, internal and the created procedural languages. You need to do createlang on the table, like so: $ createlang plpgsql test Where test is the database. --vince From vlady@school.digsys.bg Tue Feb 8 14:48:24 2000 Received: from danbo.digsys.bg (root@danbo.digsys.bg [192.92.129.10]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA51842 for ; Tue, 8 Feb 2000 09:48:24 -0500 (EST) (envelope-from vlady@lorna.digsys.bg) Received: from lorna.digsys.bg (root@lorna.digsys.bg [193.68.6.15]) by danbo.digsys.bg (8.9.0/8.9.0) with ESMTP id QAA19139 for ; Tue, 8 Feb 2000 16:48:19 +0200 (EET) Received: from lorna.digsys.bg (vlady@localhost.digsys.bg [127.0.0.1]) by lorna.digsys.bg (8.9.0/8.9.0) with ESMTP id QAA11077 for ; Tue, 8 Feb 2000 16:48:18 +0200 (EET) Message-Id: <200002081448.QAA11077@lorna.digsys.bg> X-Mailer: exmh version 2.0.2 2/24/98 To: pgsql-sql@postgresql.org From: "Vladimir Terziev" Subject: Re: [SQL] Problem with PL/pgSQL Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 08 Feb 2000 16:48:18 +0200 Sender: vlady@digsys.bg Thanks all! Vladimir From tgl@sss.pgh.pa.us Tue Feb 8 15:59:21 2000 Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA79175 for ; Tue, 8 Feb 2000 10:59:21 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA01865; Tue, 8 Feb 2000 10:57:46 -0500 (EST) To: "Vladimir Terziev" cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Problem with PL/pgSQL In-reply-to: <200002081346.PAA11001@lorna.digsys.bg> References: <200002081346.PAA11001@lorna.digsys.bg> Comments: In-reply-to "Vladimir Terziev" message dated "Tue, 08 Feb 2000 15:46:14 +0200" Date: Tue, 08 Feb 2000 10:57:46 -0500 Message-ID: <1862.950025466@sss.pgh.pa.us> From: Tom Lane "Vladimir Terziev" writes: > ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'. > What's going on? You didn't install plpgsql into your database. It's optional (just in case a dbadmin doesn't want it available for some reason). See the createlang script. regards, tom lane From wieck@debis.com Tue Feb 8 16:15:08 2000 Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de [53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id LAA83832 for ; Tue, 8 Feb 2000 11:15:08 -0500 (EST) (envelope-from wieck@debis.com) Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-sql@postgreSQL.org id m12ID7s-0003kGC; Tue, 8 Feb 100 17:04 MET Message-Id: From: wieck@debis.com (Jan Wieck) Subject: Re: [SQL] Problem with PL/pgSQL In-Reply-To: <200002081346.PAA11001@lorna.digsys.bg> from Vladimir Terziev at "Feb 8, 2000 03:46:14 pm" To: Vladimir Terziev Date: Tue, 8 Feb 2000 17:04:28 +0100 (CET) CC: pgsql-sql@postgreSQL.org Reply-To: Jan Wieck X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > > > Hi > > > I try to create the next function: > > create function ttt() RETURNS OPAQUE AS ' > BEGIN > RAISE EXCEPTION "Hello" > END' language 'plpgsql'; > > The result is: > > ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'. > Recognized languages are sql, C, internal and the created procedural languages. > > > I have postgres SQL ver. 6.5.2. > > > What's going on? As the message says, only the created procedural languages can be recognized. You haven't enabled the language and it isn't installed by default. Use createlang to install it in your database. If you install it in the template1 database, than all subsequent created databases automatically inherit this. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #========================================= wieck@debis.com (Jan Wieck) # From pgsql@mail.tcu-inc.com Thu Apr 26 12:29:12 2001 Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3QCTC308527 for ; Thu, 26 Apr 2001 08:29:12 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from mail.tcu-inc.com ([209.10.229.226]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3PJJv354074 for ; Wed, 25 Apr 2001 15:19:57 -0400 (EDT) (envelope-from pgsql@mail.tcu-inc.com) Received: (from pgsql@localhost) by mail.tcu-inc.com (8.9.3/8.9.3) id TAA32688 for pgsql-sql@postgresql.org; Tue, 24 Apr 2001 19:39:47 -0400 From: Mark Nielsen Message-Id: <200104242339.TAA32688@mail.tcu-inc.com> Subject: problem with pl/pgsql To: pgsql-sql@postgresql.org Date: Tue, 24 Apr 2001 19:39:47 -0400 (EDT) X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200104/400 X-Sequence-Number: 2758 hey guys, I am writing an article about using Perl inside sql commands. I am not having a problem with perl, but with pl/pgsql. The documentation for pl/pgsql isn't helping me out, although I am sure I will figure it out eventually. Here is the perl function, CREATE FUNCTION search_name(employee,text,integer) RETURNS text AS ' my $emp = shift; my $Text = shift; my $Case = shift; if (($Case > 0) && ($emp->{''name''} =~ /\\Q$Text\\E/i)) { return $emp->{''name''}; } elsif ($Case > 0) {return "";} elsif ($emp->{''name''} =~ /\\Q$Text\\E/) { return $emp->{''name''}; } else { return "";} ' LANGUAGE 'plperl'; insert into EMPLOYEE values ('John Doe',10000,1); insert into EMPLOYEE values ('Jane Doe',10000,1); select name,search_name(employee,'j',0) from employee; select name,search_name(employee,'j',1) from employee; select name from employee where search_name(employee,'j',1) = name; select name from employee where search_name(employee,'j',0) = name; I know these functions aren't elegant, but oh well. Here isthe pl/pgsql CREATE FUNCTION insert_name(text) RETURNS integer AS ' DECLARE rec1 record; text1 text; BEGIN text1 := $1; SELECT INTO rec1 count(name) FROM employee where search_name(employee,text1,0) = name limit 1; IF rec1.count = 0 THEN insert into employee (name) values (text1); return 1; END IF; return 0; END; ' LANGUAGE 'plpgsql'; What I am trying to do is set something up where it will only insert a value if it doesn't exist. I want it to return either 0 or 1. However, it returns 6 rows if there are 6 entries as 0 or 1. In my perl statement, it doesn't return anythng if a row doesn't match. I want the pl/pglsq statement to not return anything for any rows whatsoever, and to return either a 1 or 0 at the very end of the function. How do I execute sql commands inside pl/pgsql so that the that they remain hidden? I plan on using pl/pgsql a lot now. I really want to combine perl and pl/pgsql as standard sql options aren't that great. Thanks! Mark From josh@agliodbs.com Thu Apr 26 15:18:02 2001 Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3QFI2398672 for ; Thu, 26 Apr 2001 11:18:02 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 44486; Thu, 26 Apr 2001 08:17:57 -0700 From: "Josh Berkus" Subject: Re: problem with pl/pgsql To: Mark Nielsen Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Thu, 26 Apr 2001 08:17:57 -0700 Message-ID: In-Reply-To: <200104242339.TAA32688@mail.tcu-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200104/405 X-Sequence-Number: 2767 Mark, I'd love to help you with your PL/pgSQL function, but since I don't read Perl, I can't tell what you're trying to do. Can you spell it out more explicitly? -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco