X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id A15FBD1C4BA for ; Tue, 12 Aug 2003 16:25:44 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 79346-06 for ; Tue, 12 Aug 2003 13:24:10 -0300 (ADT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 27D21D1C47A for ; Tue, 12 Aug 2003 13:25:33 -0300 (ADT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.9/8.12.9) with ESMTP id h7CGOSbS011092; Tue, 12 Aug 2003 10:24:28 -0600 (MDT) Date: Tue, 12 Aug 2003 10:25:25 -0600 (MDT) From: "scott.marlowe" To: sla-net Cc: Subject: Re: concatenation = = transaction ????? In-Reply-To: <002d01c360ea$af623ad0$010aa8c0@SESAMEVEDIOVIS> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/41 X-Sequence-Number: 2218 On Tue, 12 Aug 2003, sla-net wrote: > Hi everybody > > It's my first post here, so be indulgent ;) > > Just to confirm : if i do > > $sql1='insert into "Enfant" ("NomEnfant","PrenomEnfant") VALUES > ('.$NomEnfant.','.$PrenomEnfant.') > > $sql2='insert into "IndividuEnfant" ("IdIndividu","IdEnfant") VALUES > ('.$IdIndividu.',currval(\'"Enfant_Seq"\')); > > $sql=$sql1.$sql2; > > $Res=pg_query($sql); > > so 2 query concatenation a a only one, send to postgress database : is it > EXACTLY the same thing than a classic transaction with a begin and a commit > or rollback ? > > Tcks, it's just i dont want to write everything again in 6 months..... It may act like it, but I'm not sure it's a gauranteed way of things working in the future. It's better to just issue a begin and commit pair around things if you want to be sure they're transactions. psql does not wrap them together, so I'm betting this behaviour is specific to the way PHP is currently implemented. > PS : why limitation to 8 patrameters in stored procedures ?????? That's a fairly old limit (pre 7.2 I think). It can be changed at compile time, but requires a pg_dump / initdb / pg_restore (i.e. if you do it with your database in place, it will stop working.) I think the new default is 16 as of 7.2 or 7.3.