pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ERROR: relation "userroles" does not exist
3+ messages / 2 participants
[nested] [flat]

* ERROR: relation "userroles" does not exist
@ 2008-10-10 17:30 Sean <sean712@gmail.com>
  2008-10-10 18:17 ` Re: ERROR: relation "userroles" does not exist Raymond O'Donnell <rod@iol.ie>
  0 siblings, 1 reply; 3+ messages in thread

From: Sean @ 2008-10-10 17:30 UTC (permalink / raw)
  To: pgsql-php

*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<http://localhost:8888/HH/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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ERROR: relation "userroles" does not exist
  2008-10-10 17:30 ERROR: relation "userroles" does not exist Sean <sean712@gmail.com>
@ 2008-10-10 18:17 ` Raymond O'Donnell <rod@iol.ie>
  2008-10-10 20:03   ` Re: ERROR: relation "userroles" does not exist Sean <sean712@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Raymond O'Donnell @ 2008-10-10 18:17 UTC (permalink / raw)
  To: Sean <sean712@gmail.com>; +Cc: pgsql-php

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
> <http://localhost:8888/HH/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
------------------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ERROR: relation "userroles" does not exist
  2008-10-10 17:30 ERROR: relation "userroles" does not exist Sean <sean712@gmail.com>
  2008-10-10 18:17 ` Re: ERROR: relation "userroles" does not exist Raymond O'Donnell <rod@iol.ie>
@ 2008-10-10 20:03   ` Sean <sean712@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Sean @ 2008-10-10 20:03 UTC (permalink / raw)
  To: rod@iol.ie; +Cc: pgsql-php

That's it. thank you..  I created it using PgAdmin.

On Fri, Oct 10, 2008 at 2:17 PM, Raymond O'Donnell <rod@iol.ie> 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
> > <http://localhost:8888/HH/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
> ------------------------------------------------------------------
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2008-10-10 20:03 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-10-10 17:30 ERROR: relation "userroles" does not exist Sean <sean712@gmail.com>
2008-10-10 18:17 ` Raymond O'Donnell <rod@iol.ie>
2008-10-10 20:03   ` Sean <sean712@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox