Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Need help with DBD::Pg

by Miguel (Friar)
on Feb 23, 2005 at 23:11 UTC ( #433896=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Need help with DBD::Pg
in thread Need help with DBD::Pg

++ for you eclark for pointing me to the docs one more time :-) I always tought it was correct, since I read this:

nextval

Advance the sequence object to its next value and return that value. This is done atomically: even if multiple sessions execute nextval concurrently, each will safely receive a distinct sequence value.

currval

Return the value most recently obtained by nextval for this sequence in the current session. (An error is reported if nextval has never been called for this sequence in this session.) Notice that because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed nextval since the current session did.

About my problem:
I'm rewriting everything using:

use DBI qw(:sql_types); ..... $sth->bind_param(1,undef,SQL_....); $sth->execute(<values>);

and spliting the multiple statements I have.

Thanks,
Miguel


Comment on Re^4: Need help with DBD::Pg
Download Code
Re^5: Need help with DBD::Pg
by eclark (Scribe) on Feb 24, 2005 at 17:36 UTC

    Actually you were correct, I'm wrong. My memory must be fading.

    That said, I doubt you'd be able to convince anyone in the DBI community that running multiple statements in prepare is a good thing. I'm still curious why you were locking a table, I've never felt the need to do that in Postgres, just let MVCC take care of it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://433896]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-09-16 22:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (51 votes), past polls