You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gavin Carr <ga...@openfusion.com.au> on 2004/08/25 02:43:37 UTC
DBIx::Recordset and postgresql schemas?
I'm trying to get DBIx::Recordset to play with a PostgreSQL 8.0beta1
install, and am getting tons of errors on my initial DBIx::Database->new
call:
use constant DB_DSN => 'dbi:Pg:dbname=foo';
use constant DB_USER => 'foo';
use constant DB_PASS => 'foo';
DBIx::Database->new(DB_DSN, DB_USER, DB_PASS, undef, 'foo', 1);
of the form:
DBD::Pg::st execute failed: ERROR: relation "triggered_update_columns" does not exist at /usr/lib/perl5/site_perl/5.8.1/DBIx/Compat.pm line 33.
select * from triggered_update_columns where 1=0 failed ERROR: relation "triggered_update_columns" does not exist at /usr/lib/perl5/site_perl/5.8.1/DBIx/Compat.pm line 35.
DBD::Pg::st execute failed: ERROR: relation "table_constraints" does not exist at /usr/lib/perl5/site_perl/5.8.1/DBIx/Compat.pm line 33.
select * from table_constraints where 1=0 failed ERROR: relation "table_constraints" does not exist at /usr/lib/perl5/site_perl/5.8.1/DBIx/Compat.pm line 35.
<lots more snipped>
It looks like DBIx::Database->new is stripping the schema information
from table names before calling QueryMetadata, which seems to be
required now? Anyone else seen this, or are successfully using
DBIx::Recordset with PostgreSQL 7.3+ (when schemas came in)? Or am
I missing something obvious?
Cheers,
Gavin
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: DBIx::Recordset and postgresql schemas?
Posted by Kaare Rasmussen <ka...@kakidata.dk>.
> It looks like DBIx::Database->new is stripping the schema information
> from table names before calling QueryMetadata, which seems to be
> required now? Anyone else seen this, or are successfully using
> DBIx::Recordset with PostgreSQL 7.3+ (when schemas came in)? Or am
> I missing something obvious?
You don't need to use schemas. I do use it though. The way I do it in
DBIx::Recordset is not pretty, but it works:
$db -> do ("SET search_path TO $schema");
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 12.00-18.00 Email: kar@kakidata.dk
2000 Frederiksberg Lørdag 12.00-16.00 Web: www.suse.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: DBIx::Recordset and postgresql schemas?
Posted by RobertCZ <ro...@robert.cz>.
Gavin Carr wrote:
>and if I do the following (again as the postgres user):
>
> perl -MDBIx::Database -le 'DBIx::Database->new("dbi:Pg:dbname=template1","postgres",undef,undef,"foo",1)'
>
>I get a long list of errors about non-existent relations. Does the above
>work okay for you on 7.3?
>
>
it does... at least it says nothing which is ok i guess
btw i plan to upgrade pg but probably not before 8.0.3 or so - i use
pg/recordset a lot, if nobody fix it by then, i'll do my best
- r.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: DBIx::Recordset and postgresql schemas?
Posted by Gavin Carr <ga...@openfusion.com.au>.
On Wed, Aug 25, 2004 at 08:06:10AM +0200, Robert Germi? wrote:
> Gavin Carr wrote:
>
> >It looks like DBIx::Database->new is stripping the schema information
> >from table names before calling QueryMetadata, which seems to be
> >required now? Anyone else seen this, or are successfully using
> >DBIx::Recordset with PostgreSQL 7.3+ (when schemas came in)? Or am
> >I missing something obvious?
>
> i got 7.3.6 and it works ok (don't use schemas)
I'm not using schemas either, but postgresql is (at least as of 7.4,
I don't have a 7.3 here to check). As postgres:
$ psql template1
template1=# \dn
List of schemas
Name | Owner
--------------------+----------
information_schema | postgres
pg_catalog | postgres
pg_temp_1 | postgres
pg_toast | postgres
public | postgres
(5 rows)
and if I do the following (again as the postgres user):
perl -MDBIx::Database -le 'DBIx::Database->new("dbi:Pg:dbname=template1","postgres",undef,undef,"foo",1)'
I get a long list of errors about non-existent relations. Does the above
work okay for you on 7.3?
Cheers,
Gavin
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: DBIx::Recordset and postgresql schemas?
Posted by Robert Germič <ge...@pcv.cz>.
Gavin Carr wrote:
>It looks like DBIx::Database->new is stripping the schema information
>from table names before calling QueryMetadata, which seems to be
>required now? Anyone else seen this, or are successfully using
>DBIx::Recordset with PostgreSQL 7.3+ (when schemas came in)? Or am
>I missing something obvious?
>
>
i got 7.3.6 and it works ok (don't use schemas)
--
S pozdravem/Best Regards
Robert Germic
Prvni ceska virtualni s.r.o., Vinohradska 25/35, CZ-120 00 Praha 2
Email: germic@pcv.cz, Mob. tel.: (+420 602) 213 480
NetBooking Czech Republic s.r.o., Trebohostická 12, CZ-100 00 Praha 10
Email: germic@netbooking.cz, Mob. tel.: (+420 602) 512 512
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org