Our current configuration:
Postgres 7.4.8 (newly upgraded)
Perl 5.8.7 (also newly upgraded)
DBI 1.40
DBD::Pg 1.31
We have no outstanding problems traceable to anything in this pile of
code. Is there anything in the current DBI or DBD::Pg versions that
should tempt us to upgrade?
--
Jeff Boes
correctly 50
minutes later with no changes to the system or code.
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
is it possible to do it in one statment for each database
Delete FROM table1,table2,table3,table4 WHERE userid = userid;
Any help is appreciated
Your question has nothing to do with DBI. This is a question about
SQL in general and the particualar SQL implementation you are using.
distinct page from $table?
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax 616.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend your Expertise
the database connection over and over. This is very
inefficient. Is there some way to inherit the connection so it
doesn't have to be recreated?
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax 616.349.9076
Nexcerpt
of cheese. --- G. K
Chesterton
___
Jeff Boes[EMAIL PROTECTED]
.
So what's the answer? At present, we cannot upgrade to PostgreSQL 7.3
because the DBD code will quit working. I could produce a patch that
solves our problem, but I have no facilities or expertise to verify that
it will work for everyone.
--
Jeff Boes vox
test with :
t/01connect.Can't locate Test/More.pm in @INC (@INC contains:
blib/arch
You need to install Test::More from the CPAN.
I had the same problem, installed Test::More, and it still reported
these errors, but DBD::Pg installed anyway.
--
Jeff Boes
(0x8bf36a0)~INNER)
dbd_st_destroy
- DESTROY= undef at perl5db.pl line 1468
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax 616.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
On Tue, 2002-12-03 at 11:12, Jeff Boes wrote:
We may have uncovered an incompatibility with DBD::Pg (version 1.20 is
the latest we have) and the newly-released PostgreSQL 7.3.
It appears that the DESTROY method for database and/or statement handles
is referencing a system table (pg_relcheck
.
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax 616.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend your Expertise
banner from v$version, and parsing the appropriate bits out. I
reckon it would be nicer (and presumably more portable) if the DBD layer
could expose this info.
Well, the easiest way would be to roll your own extended class from DBI,
and just add the version as a new method.
--
Jeff Boes
select * from regular_foo where col like '%pattern%';
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax 616.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend
* from table
join (select 1 as pkey) as x using (pkey);
If your database doesn't support such a syntax, rewrite the inner select
as a view or temporary table.
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax
so in the code above by clearing PrintError, but
apparently the error generated by assigning to $db-{Profile} is coming
from somewhere so deep inside the DBI code that it's not honoring
PrintError (or eval{}, for that matter!).
--
Jeff Boes vox 616.226.9550 ext
On Tue, 2002-10-08 at 18:19, Mark Swayne wrote:
How do I get a list of sequences with DBD::Pg?
Well, the straightforward approach is:
SELECT * FROM pg_class WHERE relkind = 'S';
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer
Sorry. Does anyone here know the status of the PostgreSQL mailing
lists? They appear to have crashed hard somewhere around 9/25 ...
Even groups.google.com seems to have lost track of them ... the only
messages they have are ones posted to Google directly.
--
Jeff Boes
On Tue, 2002-08-13 at 15:55, Tim Bunce wrote:
If you (or anyone else) is using DBI 1.29 then upgrade to 1.30.
Anyone know if there are any issues for upgrading from 1.22 to 1.30?
How urgently should I pursue this if things are working for me now?
--
Jeff Boes
On Thu, 2002-08-01 at 11:30, Tim Bunce wrote:
news://nntp.x.perl.org/
Are you sure about the 'x.'? I have long been able to connect at
nntp.perl.org, but with the 'x.' I get no connection.
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer
, but have the rows
that have no addr1 value listed *last*?
Well, the easiest way (in the SQL query) is to use COALESCE or a similar
function for your database. Just do something like
ORDER BY COALESCE(addr1,'ZZZ') ...
--
Jeff Boes vox 616.226.9550 ext 24
On Mon, 2002-06-17 at 10:00, Jeff Boes wrote:
We are experiencing a fairly predictable lock-up in the overnight VACUUM
ANALYZE maintenance script. The VACUUM gets to the pg_class table and
then stops, obviously waiting for something else to give up control of
the table. The VACUUM script
On Thu, 2002-06-13 at 11:25, Jeff Boes wrote:
I may have asked this or seen this asked before, but my memory is poor
today: is there any way to know the process ID associated with the
database backend connected to a DBD::Pg database handle?
Further investigation shows:
The old 'Pg.pm' (pre
I had no response to this earlier posting. Has anyone else experienced
this problem? Am I doing something stupid here?
On Thu, 2002-05-30 at 12:05, Jeff Boes wrote:
I'm using DBI V1.21, DBD::Pg V1.12. Given this setup:
#!/usr/bin/perl -w
use strict;
use DBI;
my $dbh = DBI-connect
execute notice that it has too few parameters in this case?
It notices when you have two placeholders and one value, but if you
supply no parameters to execute, it doesn't complain.
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer
On Wed, 2002-04-24 at 10:00, Dave K wrote:
data type would behave, and the results were less distressing. Question: Is
the numeric type depreciated?
I should say not:
http://www.postgresql.org/idocs/index.php?datatype.html#DATATYPE-NUMERIC-DECIMAL
(7.2.1 documentation)
--
Jeff Boes
sometimes cause SEGV by just doing
my types = { $sth-{pg_type} };
for a table with a numeric column, I'd say it's not just a matter of
extra processing. The array referenced by $sth-{pg_type} seems to be
garbled. (Interestingly, I can avoid this by running under the Perl
debugger.)
--
Jeff
this, you'll get some unprintable output from the first print
statement, and the second print causes a segmentation fault.
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax 616.349.9076
Nexcerpt, Inc
According to the DBI dox, this:
names = map { scalar $dbh-type_info($_)-{TYPE_NAME} }
{ $sth-{TYPE} }
should return the datatype of each column of a SELECT statement. All I
ever get is undefs. Does this not work right under DBD::Pg?
--
Jeff Boes
start inserting, then recreate it at the end. Not all DBMSs have
deferrable indices. Of course, the big problem here is capturing the
definition of each index before you drop it: if you hard-code the
definitions in your DBI code, you run the risk of having a
disappearing index.
--
Jeff Boes
/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI/Format.pm line 265.
Bareword DBI::SQL_NUMERIC not allowed while strict subs in use at
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI/Format.pm line 265.
Any ideas would be appreciated.
--
Jeff Boes vox
On Thu, 2002-02-28 at 09:36, Jeff Boes wrote:
Bareword DBI::SQL_DATE not allowed while strict subs in use at
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI/Format.pm line 265.
I found it. 'use DBI;' must appear before 'use DBI::Format;'.
However:
use DBI;
use DBI::Format;
my $n = DBI
Is it true that RowCacheSize has no effect with the DBD::Pg driver? The
DBD::Pg doc just says that it's Implemented by DBI, not used by
driver, which implies that DBI actually does something by default.
--
Jeff Boes vox 616.226.9550
Database Engineer
release
their database handles? What about mod_perl processes?
--
Jeff Boes vox 616.226.9550
Database Engineer fax 616.349.9076
Nexcerpt, Inc. [EMAIL PROTECTED]
'undef's, not strings.
$DOMAIN = undef; # or 'undef $DOMAIN;'
--
Jeff Boes vox 616.226.9550
Database Engineer fax 616.349.9076
Nexcerpt, Inc. [EMAIL PROTECTED]
On Thu, 25 Oct 2001 14:10:10 -0400
Jeff Boes [EMAIL PROTECTED] wrote:
The following code fails with an 'Unterminated quote string' error.
#!/usr/bin/perl -w
use strict;
use DBI;
use Carp;
my $dbh = DBI-connect('dbi:Pg:dbname=nexcerpt', '', '', {AutoCommit=0
--
Jeff Boes vox 616.226.9550
Database Engineer fax 616.349.9076
Nexcerpt, Inc. [EMAIL PROTECTED]
(or
even
sets of data generated by database as a response to ANY sql statement)
May I recommend: phppgadmin
(http://www.greatbridge.org/project/phppgadmin/projdisplay.php). It's not
Perl, but it's a great tool for browsing and administering PostgreSQL
databases.
--
Jeff Boes
' = '',
'NAME' = 'hit_date',
'NOTNULL' = '1',
'DEFAULT' = ''
}
];
end of block
--
Jeff Boes vox 616.226.9550
Database Engineer fax 616.349.9076
Nexcerpt, Inc
that I accidently munged my
warning handler to die instead of warn, so the above statement was
crashing my code.
--
Jeff Boes vox 616.226.9550
Database Engineer fax 616.349.9076
Nexcerpt, Inc
.
--
Jeff Boes vox 616.226.9550
Database Engineer fax 616.349.9076
Nexcerpt, Inc. [EMAIL PROTECTED]
this to
$stmt = $dbh-prepare(SELECT * FROM foo WHERE date_added $mydate);
it's fine. What am I missing here?
--
Jeff Boes vox 616.226.9550
Database Engineer fax 616.349.9076
Nexcerpt, Inc
41 matches
Mail list logo