db_permissions

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



dbi-users@isc.org

Subject: RE: DBD:Pg and CREATE TABLE
From: Ilya Sterin <ideas_pc@usa.com>
Date: Sat, 16 Sep 2000 13:49:57 -0400 (EDT)

Jochen Schmidt <jochen@joyce.giub.uni-bonn.de> wrote: 

> Using DBI 1.13 and DBD::PG 0.93 on linux suse 6.2, Postgres 6.5.1,
> I had much fun with normal SELECT statements in $sth= $dbh->prepare()
> Everything worked fine!
> Now I tried a CREATE TABLE and I got the following error:
> 
> the statement (which works fine on the psql console):
> CREATE TABLE bla AS SELECT t.date AS date,
> date_part('hour',datetime(t.date,t.ti
> me)) AS hour, avg(tu.depth) AS depth, avg(p.height) AS height, avg(t.value)
> AS d
> iverpress FROM  field fa, timeval t, field fd, tube tu, points p WHERE
> t.field_i
> d=204 AND t.field_id=fa.id AND fa.georef_id=fd.georef_id AND
> tu.field_id=fd.id A
> ND fa.georef_id=p.loc_id GROUP BY
> t.date,date_part('hour',datetime(t.date,t.time
> ))
> 
> and the error:
> DBD::Pg::st execute failed: ERROR:  bla: Table does not exist.
> Couldn't execute statement: ERROR:  bla: Table does not exist.


I think it has to do with permissions.  Are you using same username,
password in script as you do directly??  Not sure about Postgres but it
Oracle and other packages you have to refer to table by full name unless a
synonym is created.



===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu