Unable to access table named "user"
Unable to access table named "user"
От:
Joe Kramer <cckramer@gmail.com>
Дата:
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.
Re: Unable to access table named "user"
От:
Scott Marlowe <scott.marlowe@gmail.com>
Дата:
On Tue, May 12, 2009 at 1:26 AM, 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; Try "public"."user"
Re: Unable to access table named "user"
От:
Joe Kramer <cckramer@gmail.com>
Дата:
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 wrote: > On Tue, May 12, 2009 at 1:26 AM, 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; > > Try "public"."user" >
Re: Unable to access table named "user"
От:
Sam Mason <sam@samason.me.uk>
Дата:
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/
Re: Unable to access table named "user"
От:
Adrian Klaver <aklaver@comcast.net>
Дата:
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