Re: db_dataobject createTables.php and postgresql
| From: | Culley Harrelson | Date: | Thu, 12 Aug 2004 13:12:33 +0000 |
| Subject: | Re: db_dataobject createTables.php and postgresql | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14081@lists.php.net to get a copy of this message | ||
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...
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
>
>