pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
concatenation = = transaction ?????
4+ messages / 2 participants
[nested] [flat]

* concatenation = = transaction ?????
@ 2003-08-12 15:59 sla-net <slambert@vediovis.net>
  2003-08-12 16:15 ` Re: concatenation = = transaction ????? sla-net <slambert@vediovis.net>
  2003-08-12 16:25 ` Re: concatenation = = transaction ????? scott.marlowe <scott.marlowe@ihs.com>
  0 siblings, 2 replies; 4+ messages in thread

From: sla-net @ 2003-08-12 15:59 UTC (permalink / raw)
  To: pgsql-php

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.....

S.L.

PS : why limitation to 8 patrameters in stored procedures ??????




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: concatenation = = transaction ?????
  2003-08-12 15:59 concatenation = = transaction ????? sla-net <slambert@vediovis.net>
@ 2003-08-12 16:15 ` sla-net <slambert@vediovis.net>
  2003-08-12 16:50   ` Re: concatenation = = transaction ????? scott.marlowe <scott.marlowe@ihs.com>
  1 sibling, 1 reply; 4+ messages in thread

From: sla-net @ 2003-08-12 16:15 UTC (permalink / raw)
  To: Joshua D. Drake <jd@commandprompt.com>; pgsql-php

> >PS : why limitation to 8 patrameters in stored procedures ??????
> >  
> >
> What version of pgSQL are you running? I believe the newer versions 
> support up to 32 parameters.

7.3.3

Stef



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: concatenation = = transaction ?????
  2003-08-12 15:59 concatenation = = transaction ????? sla-net <slambert@vediovis.net>
  2003-08-12 16:15 ` Re: concatenation = = transaction ????? sla-net <slambert@vediovis.net>
@ 2003-08-12 16:50   ` scott.marlowe <scott.marlowe@ihs.com>
  0 siblings, 0 replies; 4+ messages in thread

From: scott.marlowe @ 2003-08-12 16:50 UTC (permalink / raw)
  To: sla-net <slambert@vediovis.net>; +Cc: Joshua D. Drake <jd@commandprompt.com>; pgsql-php

On Tue, 12 Aug 2003, sla-net wrote:

> > >PS : why limitation to 8 patrameters in stored procedures ??????
> > >  
> > >
> > What version of pgSQL are you running? I believe the newer versions 
> > support up to 32 parameters.
> 
> 7.3.3

P.s. I misquoted, I think 16 is the new standard.

32 is the new maximum number of columns in a multi-key index.




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: concatenation = = transaction ?????
  2003-08-12 15:59 concatenation = = transaction ????? sla-net <slambert@vediovis.net>
@ 2003-08-12 16:25 ` scott.marlowe <scott.marlowe@ihs.com>
  1 sibling, 0 replies; 4+ messages in thread

From: scott.marlowe @ 2003-08-12 16:25 UTC (permalink / raw)
  To: sla-net <slambert@vediovis.net>; +Cc: pgsql-php

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.






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2003-08-12 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-12 15:59 concatenation = = transaction ????? sla-net <slambert@vediovis.net>
2003-08-12 16:15 ` sla-net <slambert@vediovis.net>
2003-08-12 16:50   ` scott.marlowe <scott.marlowe@ihs.com>
2003-08-12 16:25 ` scott.marlowe <scott.marlowe@ihs.com>

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