Re: Support for PostgreSQL schemas
[prev]
[thread]
[next]
[Date index for 2005/07/13]
Ah, that's the thing--that's not my query, Class::DBI::Pg is issuing
that. I've been told that a patch has been sent to the cdbi::Pg
author--here's hoping it goes in :-)
On Tue, 2005-07-12 at 17:34 -0500, Jay Strauss wrote:
> Actually that is the problem, your subselect is returning more than 1
> row but you are using an "="
>
> > indrelid=(
> > SELECT oid FROM pg_catalog.pg_class
> > WHERE relname = ?)
>
> make it look like:
>
> indrelid in (
> SELECT oid FROM pg_catalog.pg_class
> WHERE relname = ?)
>
> Scott Cain wrote:
> > Hello,
> >
> > I am wondering if there is support for postgres schemas in cdbi?
> > Specifically, I have a case where there are two schemas, one called
> > public and one called godb. In both of these schemas, there is a table
> > called 'db', and I cannot change the name of either table. When I try
> > to use cdbi to access the db table in the public schema, I get this
> > error message:
> >
> > DBD::Pg::st execute failed: ERROR: more than one row returned by a
> > subquery used as an expression
> > [for Statement "SELECT indkey FROM pg_catalog.pg_index
> > WHERE indisprimary=true AND indrelid=(
> > SELECT oid FROM pg_catalog.pg_class
> > WHERE relname = ?)
> > " with ParamValues: 1='db']
> > at /usr/lib/perl5/site_perl/5.8.5/DBIx/ContextualFetch.pm line 51.
> > Compilation failed in require at lib/Chado/LoadDBI.pm line 5.
> > BEGIN failed--compilation aborted at lib/Chado/LoadDBI.pm line 5.
> > Compilation failed in require at ./load/bin/gmod_load_ontology.pl line
> > 7.
> > BEGIN failed--compilation aborted at ./load/bin/gmod_load_ontology.pl
> > line 7.
> >
> > So it looks like DBIx::ContextualFetch is unhappy about there being two
> > tables named 'db'. Is there a way around this?
> >
> > Thanks,
> > Scott
> >
> >
--
------------------------------------------------------------------------
Scott Cain, Ph. D. cain@xxxx.xxx
GMOD Coordinator (http://www.gmod.org/) 216-392-3087
Cold Spring Harbor Laboratory