ERROR: relation "userroles" does not exist
am 10.10.2008 19:30:31 von Sean
------=_Part_130355_4313784.1223659831206
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
*Hello All,
*I keep receiving the following when trying to select from a table in my
database. the Tables are there i see them in pgAdmin...
*Warning*: pg_query_params()
[function.pg-query-params]:
Query failed: ERROR: relation "userroles" does not exist
The query I'm running is
SELECT userPassword, salt, roleName
FROM User u, UserRoles ur, Roles r
where u.id = ur.user_id
and r.id = ur.role_id
and u.username = $1
and u.active = true
------=_Part_130355_4313784.1223659831206
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hello All,
I keep receiving the following when trying to select from a table in my database. the Tables are there i see them in pgAdmin...
Warning: pg_query_params() []: Query failed: ERROR: relation "userroles" does not exist
The query I'm running is
SELECT userPassword, salt, roleName
FROM User u, UserRoles ur, Roles r
where = ur.role_id
and u.username = $1
and u.active = true
------=_Part_130355_4313784.1223659831206--
Re: ERROR: relation "userroles" does not exist
am 10.10.2008 20:17:08 von Rod
On 10/10/2008 18:30, Sean wrote:
> *I keep receiving the following when trying to select from a table in my
> database. the Tables are there i see them in pgAdmin...
>
> *Warning*: pg_query_params() [function.pg-query-params
> ]: Query failed:
> ERROR: relation "userroles" does not exist
Would you have defined the table using quoted upper-case? PG folds names
to lower-case unless you double quote them, so:
test=# create table test();
CREATE TABLE
test=# create table "Test"();
CREATE TABLE
test=# \dt
List of relations
Schema | Name | Type | Owner
--------+------+-------+----------
public | Test | table | postgres
public | test | table | postgres
(2 rows)
Ray.
------------------------------------------------------------ ------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------ ------
--
Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php
Re: ERROR: relation "userroles" does not exist
am 10.10.2008 22:03:44 von Sean
------=_Part_133012_18133933.1223669024736
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
That's it. thank you.. I created it using PgAdmin.
On Fri, Oct 10, 2008 at 2:17 PM, Raymond O'Donnell wrote:
> On 10/10/2008 18:30, Sean wrote:
> > *I keep receiving the following when trying to select from a table in my
> > database. the Tables are there i see them in pgAdmin...
> >
> > *Warning*: pg_query_params() [function.pg-query-params
> > ]: Query failed:
> > ERROR: relation "userroles" does not exist
>
> Would you have defined the table using quoted upper-case? PG folds names
> to lower-case unless you double quote them, so:
>
> test=# create table test();
> CREATE TABLE
> test=# create table "Test"();
> CREATE TABLE
> test=# \dt
> List of relations
> Schema | Name | Type | Owner
> --------+------+-------+----------
> public | Test | table | postgres
> public | test | table | postgres
> (2 rows)
>
>
> Ray.
>
> ------------------------------------------------------------ ------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod@iol.ie
> Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
> ------------------------------------------------------------ ------
>
------=_Part_133012_18133933.1223669024736
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
That's it. thank you.. I created it using PgAdmin.
On Fri, Oct 10, 2008 at 2:17 PM, Raymond O'Donnell
<> wrote:
On 10/10/2008 18:30, Sean wrote:
> *I keep receiving the following when trying to select from a table in my
> database. the Tables are there i see them in pgAdmin...
>
> *Warning*: pg_query_params() [function.pg-query-params
> <>]: Query failed:
> ERROR: relation "userroles" does not exist
Would you have defined the table using quoted upper-case? PG folds names
to lower-case unless you double quote them, so:
test=# create table test();
CREATE TABLE
test=# create table "Test"();
CREATE TABLE
test=# \dt
List of relations
Schema | Name | Type | Owner
--------+------+-------+----------
public | Test | table | postgres
public | test | table | postgres
(2 rows)
Ray.
------------------------------------------------------------ ------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
Galway Cathedral Recitals:
------------------------------------------------------------ ------
------=_Part_133012_18133933.1223669024736--