pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedUnable to access table named "user"
8+ messages / 6 participants
[nested] [flat]
* Unable to access table named "user"
@ 2009-05-12 07:19 Joe Kramer <cckramer@gmail.com>
2009-05-12 14:40 ` Re: Unable to access table named "user" Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
0 siblings, 1 reply; 8+ messages in thread
From: Joe Kramer @ 2009-05-12 07:19 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
I have table named user (lower case) in public schema.
I can access it using Pgadmin as
SELECT * from "user"; SELECT * from "public.user"; SELECT * FROM public.user;
I can't find any way to access this table from Jdbc.
Tried to access as public.user, user in single and double quotes, nothing helps.
I get exceptions like
ERROR: relation "public.user" does not exist
ERROR: relation "user" does not exist
Also tried to execute "SET search_path TO public" beforehand in same
jdbc connection, makes no difference.
Is there any way?
Thanks.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Unable to access table named "user"
2009-05-12 07:19 Unable to access table named "user" Joe Kramer <cckramer@gmail.com>
@ 2009-05-12 14:40 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
0 siblings, 0 replies; 8+ messages in thread
From: Heikki Linnakangas @ 2009-05-12 14:40 UTC (permalink / raw)
To: Joe Kramer <cckramer@gmail.com>; +Cc: pgsql-jdbc
Joe Kramer wrote:
> Hi,
>
> I have table named user (lower case) in public schema.
> I can access it using Pgadmin as
> SELECT * from "user"; SELECT * from "public.user"; SELECT * FROM public.user;
Odd, I would not expect the 2nd variant to work, unless you also have a
table called "public.user", ie with a dot in the name.
> I can't find any way to access this table from Jdbc.
> Tried to access as public.user, user in single and double quotes, nothing helps.
> I get exceptions like
> ERROR: relation "public.user" does not exist
> ERROR: relation "user" does not exist
>
> Also tried to execute "SET search_path TO public" beforehand in same
> jdbc connection, makes no difference.
>
> Is there any way?
These should all work:
SELECT * FROM "user"
SELECT * FROM public.user
SELECT * FROM public."user"
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Unable to access table named "user"
@ 2009-05-12 07:26 Joe Kramer <cckramer@gmail.com>
2009-05-12 07:55 ` Re: Unable to access table named "user" Scott Marlowe <scott.marlowe@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Joe Kramer @ 2009-05-12 07:26 UTC (permalink / raw)
To: pgsql-general@postgresql.org
Hi,
I have table named user (lower case) in public schema.
I can access it using Pgadmin as
SELECT * from "user"; SELECT * from "public.user"; SELECT * FROM public.user;
I can't find any way to access this table from Jdbc.
Tried to access as public.user, user in single and double quotes, nothing helps.
I get exceptions like
ERROR: relation "public.user" does not exist
ERROR: relation "user" does not exist
Also tried to execute "SET search_path TO public" beforehand in same
jdbc connection, makes no difference.
Is there any way?
Thanks.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Unable to access table named "user"
2009-05-12 07:26 Unable to access table named "user" Joe Kramer <cckramer@gmail.com>
@ 2009-05-12 07:55 ` Scott Marlowe <scott.marlowe@gmail.com>
2009-05-12 08:57 ` Re: Unable to access table named "user" Joe Kramer <cckramer@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Scott Marlowe @ 2009-05-12 07:55 UTC (permalink / raw)
To: Joe Kramer <cckramer@gmail.com>; +Cc: pgsql-general@postgresql.org
On Tue, May 12, 2009 at 1:26 AM, Joe Kramer <cckramer@gmail.com> wrote:
> Hi,
>
> I have table named user (lower case) in public schema.
> I can access it using Pgadmin as
> SELECT * from "user"; SELECT * from "public.user"; SELECT * FROM public.user;
Try "public"."user"
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Unable to access table named "user"
2009-05-12 07:26 Unable to access table named "user" Joe Kramer <cckramer@gmail.com>
2009-05-12 07:55 ` Re: Unable to access table named "user" Scott Marlowe <scott.marlowe@gmail.com>
@ 2009-05-12 08:57 ` Joe Kramer <cckramer@gmail.com>
2009-05-12 10:16 ` Re: Unable to access table named "user" Sam Mason <sam@samason.me.uk>
0 siblings, 1 reply; 8+ messages in thread
From: Joe Kramer @ 2009-05-12 08:57 UTC (permalink / raw)
To: Scott Marlowe <scott.marlowe@gmail.com>; pgsql-general@postgresql.org; pgsql-jdbc
Don't help either.
Jdbc statement:
SELECT * from "public"."user" ;
Exception:
ERROR: relation "public.user" does not exist
On Tue, May 12, 2009 at 5:55 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> On Tue, May 12, 2009 at 1:26 AM, Joe Kramer <cckramer@gmail.com> wrote:
>> Hi,
>>
>> I have table named user (lower case) in public schema.
>> I can access it using Pgadmin as
>> SELECT * from "user"; SELECT * from "public.user"; SELECT * FROM public.user;
>
> Try "public"."user"
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Unable to access table named "user"
2009-05-12 07:26 Unable to access table named "user" Joe Kramer <cckramer@gmail.com>
2009-05-12 07:55 ` Re: Unable to access table named "user" Scott Marlowe <scott.marlowe@gmail.com>
2009-05-12 08:57 ` Re: Unable to access table named "user" Joe Kramer <cckramer@gmail.com>
@ 2009-05-12 10:16 ` Sam Mason <sam@samason.me.uk>
2009-05-12 13:59 ` Re: Unable to access table named "user" Adrian Klaver <aklaver@comcast.net>
0 siblings, 1 reply; 8+ messages in thread
From: Sam Mason @ 2009-05-12 10:16 UTC (permalink / raw)
To: pgsql-general@postgresql.org
On Tue, May 12, 2009 at 06:57:07PM +1000, Joe Kramer wrote:
> Don't help either.
>
> Jdbc statement:
> SELECT * from "public"."user" ;
>
> Exception:
> ERROR: relation "public.user" does not exist
Are you sure the table exists or you're connecting to the correct
database then? If you connect with psql and do "\dt" does it show up?
--
Sam http://samason.me.uk/
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Unable to access table named "user"
2009-05-12 07:26 Unable to access table named "user" Joe Kramer <cckramer@gmail.com>
2009-05-12 07:55 ` Re: Unable to access table named "user" Scott Marlowe <scott.marlowe@gmail.com>
2009-05-12 08:57 ` Re: Unable to access table named "user" Joe Kramer <cckramer@gmail.com>
2009-05-12 10:16 ` Re: Unable to access table named "user" Sam Mason <sam@samason.me.uk>
@ 2009-05-12 13:59 ` Adrian Klaver <aklaver@comcast.net>
0 siblings, 0 replies; 8+ messages in thread
From: Adrian Klaver @ 2009-05-12 13:59 UTC (permalink / raw)
To: pgsql-general@postgresql.org; +Cc: Sam Mason <sam@samason.me.uk>
On Tuesday 12 May 2009 3:16:34 am Sam Mason wrote:
> On Tue, May 12, 2009 at 06:57:07PM +1000, Joe Kramer wrote:
> > Don't help either.
> >
> > Jdbc statement:
> > SELECT * from "public"."user" ;
> >
> > Exception:
> > ERROR: relation "public.user" does not exist
>
> Are you sure the table exists or you're connecting to the correct
> database then? If you connect with psql and do "\dt" does it show up?
>
> --
> Sam http://samason.me.uk/
I would have to second Sam on this. If you find you are connected to the correct
database, does the JDBC driver allow you to select other tables or is the
problem restricted to this table?
--
Adrian Klaver
aklaver@comcast.net
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Unable to access table named "user"
@ 2009-05-13 01:13 dmp <danap@ttc-cmc.net>
0 siblings, 0 replies; 8+ messages in thread
From: dmp @ 2009-05-13 01:13 UTC (permalink / raw)
To: Joe Kramer <cckramer@gmail.com>; +Cc: pgsql-jdbc
> Joe Kramer wrote:
>
>> Hi,
>>
>> I have table named user (lower case) in public schema.
>> I can access it using Pgadmin as
>> SELECT * from "user"; SELECT * from "public.user"; SELECT * FROM
>> public.user;
>
>
> Odd, I would not expect the 2nd variant to work, unless you also have
> a table called "public.user", ie with a dot in the name.
>
>> I can't find any way to access this table from Jdbc.
>> Tried to access as public.user, user in single and double quotes,
>> nothing helps.
>> I get exceptions like
>> ERROR: relation "public.user" does not exist
>> ERROR: relation "user" does not exist
>>
>> Also tried to execute "SET search_path TO public" beforehand in same
>> jdbc connection, makes no difference.
>>
>> Is there any way?
>
>
> These should all work:
> SELECT * FROM "user"
> SELECT * FROM public.user
> SELECT * FROM public."user"
>
> --
> Heikki Linnakangas
> EnterpriseDB http://www.enterprisedb.com
--
-- MyJSQLView SQL Dump
-- Version: 3.01
-- WebSite: http://myjsqlview.org
--
-- Host: 127.0.0.1
-- Generated On: 2009.05.12 AD at 07:09:47 MDT
-- SQL version: PostgreSQL 8.3.3
-- Database: key_tables
--
-- ------------------------------------------
--
-- Dumping data for table "public"."keY_tAble2"
--
LOCK TABLE "public"."keY_tAble2";
INSERT INTO "public"."keY_tAble2" ("Host", "Db", "Username",
"select_priv") VALUES ('cindy', 'sample', 'danap', 't');
danap.
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2009-05-13 01:13 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12 07:19 Unable to access table named "user" Joe Kramer <cckramer@gmail.com>
2009-05-12 14:40 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2009-05-12 07:26 Unable to access table named "user" Joe Kramer <cckramer@gmail.com>
2009-05-12 07:55 ` Scott Marlowe <scott.marlowe@gmail.com>
2009-05-12 08:57 ` Joe Kramer <cckramer@gmail.com>
2009-05-12 10:16 ` Sam Mason <sam@samason.me.uk>
2009-05-12 13:59 ` Adrian Klaver <aklaver@comcast.net>
2009-05-13 01:13 Re: Unable to access table named "user" dmp <danap@ttc-cmc.net>
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