Re: Is there something wrong with Perl`s dbi and PostgreSQL?

From: greg(at)turnstep(dot)com
To: pgsql-sql(at)postgresql(dot)org
Cc: jself(at)nngov(dot)com
Subject: Re: Is there something wrong with Perl`s dbi and PostgreSQL?
Date: 2003-09-29 18:45:20
Message-ID: a12bbba041a8725c804b028dcc3b0894@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I just tried running a perl script that I wrote about a year ago. It had
> worked for me in the past. Now it doesn't work.

You have AutoCommit set to off, and never commit the transaction. Therefore,
the table creation is rolled back. Add a

$dbh->commit()

after your execute line and it should work as expected.

Also note that your "die" on connect will not work because you have RaiseError
set: Leave it off for the connect, then turn it on again immediately via:

$dbh->{RaiseError}=1;

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200309291445

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE/eH4AvJuQZxSWSsgRAgkVAJ46YX5iJ1+pbeJOQ6RJYId/6yhOWQCeKy7R
doP2RZN1y353MT+c4KdYywA=
=KUHS
-----END PGP SIGNATURE-----

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-09-29 19:12:14 Re: Problems to be solved as soon as possible
Previous Message Rasmus Aveskogh 2003-09-29 18:23:40 Re: Result set granularity..