pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: scott.marlowe <scott.marlowe@ihs.com>
To: sla-net <slambert@vediovis.net>
Cc: pgsql-php@postgresql.org
Subject: Re: concatenation = = transaction ?????
Date: Tue, 12 Aug 2003 10:25:25 -0600 (MDT)
Message-ID: <Pine.LNX.4.33.0308121016420.4078-100000@css120.ihs.com> (raw)
In-Reply-To: <002d01c360ea$af623ad0$010aa8c0@SESAMEVEDIOVIS>

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.






view thread (4+ messages)  latest in thread

Message-ID: <Pine.LNX.4.33.0308121016420.4078-100000@css120.ihs.com>
Permalink:  ../Pine.LNX.4.33.0308121016420.4078-100000@css120.ihs.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.33.0308121016420.4078-100000@css120.ihs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: scott.marlowe@ihs.com, slambert@vediovis.net
  Subject: Re: concatenation = = transaction ?????
  In-Reply-To: <Pine.LNX.4.33.0308121016420.4078-100000@css120.ihs.com>
  References: <002d01c360ea$af623ad0$010aa8c0@SESAMEVEDIOVIS> <Pine.LNX.4.33.0308121016420.4078-100000@css120.ihs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox