Re: db_dataobject createTables.php and postgresql
| From: | Justin Patrin | Date: | Thu, 12 Aug 2004 17:06:08 +0000 |
| Subject: | Re: db_dataobject createTables.php and postgresql | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14085@lists.php.net to get a copy of this message | ||
On Thu, 12 Aug 2004 06:12:33 -0700, Culley Harrelson
<harrelson@gmail.com> wrote:
> Yes this query returns data when I run it in psql. I am not using
> schemas, meaning everything is in the public schema.
>
> Where can I find those bug reports? 682 and 1607 are old php 3 bugs
> on bugs.php.net...
PEAR bugs, not PHP bugs.
http://pear.php.net/bugs/bug.php?id=682
http://pear.php.net/bugs/bug.php?id=1607
>
> culley
>
>
>
> On Thu, 12 Aug 2004 14:46:58 +0200, Olivier Guilyardi <ml@xung.org> wrote:
> >
> > When you run this query in psql, does it actually return anything ?
> > Or an empty result ?
> > The "insufficient data supplied" error, here, AFAIK, is not related to
> > the query itself, but to the result of this query not being checked
> > before it's passed to some other DB function.
> >
> > I've had this problem when using Postgresql schemas : this query actually
> > returned nothing because it does not handle schemas. And this caused
> > exactly the same error. I was running createTables.php as well.
> >
> > In case your're using schemas, you may take look at DB_pgsql bugs #682
> > and #1607
> >
> > --
> > og
> >
> >
> >
> > Culley Harrelson wrote:
> > > I was trying to run createTables.php on my database and got:
> > >
> > > [db_error: message="DB Error: insufficient data supplied" code=-20
> > > mode=return level=notice prefix="" info="SELECT c.relname as
> > > "Name"
> > > FROM pg_class c, pg_user u
> > > WHERE c.relowner = u.usesysid AND c.relkind = 'r'
> > > AND not exists (select 1 from pg_views where
> > > viewname = c.relname)
> > > AND c.relname !~ '^(pg_|sql_)'
> > > UNION
> > > SELECT c.relname as "Name"
> > > FROM pg_class c
> > > WHERE c.relkind = 'r'
> > > AND not exists (select 1 from pg_views where
> > > viewname = c.relname)
> > > AND not exists (select 1 from pg_user where
> > > usesysid = c.relowner)
> > >
> > > I can run this sql manually and it works. I granted select on
> > > pg_class and pg_users to the user indicated in the ini file and it
> > > still doesn't work (when I log in to psql as the user I can run the
> > > sql). Any tips?
> > >
> > > I am using postgresql 7.4.1 and
> > >
> > > DB 1.6.5
> > > DB_DataObject 1.7.1
> > >
> > > culley
> > >
> >
> > --
> > PEAR General Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--