pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
relation does not exist
4+ messages / 3 participants
[nested] [flat]

* relation does not exist
@ 2006-02-21 19:17 eric cartman <panefsky@yahoo.com>
  2006-02-21 19:29 ` Re: relation does not exist Mark Lewis <mark.lewis@mir3.com>
  2006-02-21 20:00 ` Re: relation does not exist Kris Jurka <books@ejurka.com>
  0 siblings, 2 replies; 4+ messages in thread

From: eric cartman @ 2006-02-21 19:17 UTC (permalink / raw)
  To: pgsql-jdbc

Hello to everyone,
   
  I have a small problem using PostgreSQL.
  The problem is that I create a database and some tables through ant and an .sql file.
  Then by using DatabaseMetaData class and method getTables(..)I can make a list of the newly created tables, implying that everything worked fine.
   
  But when I am trying to Insert values into tables, i get the message 'relation <name> does not exist'.
   
  How can this be possible?
   
   
  Thank you all in advance.
   
  T.Panos

		
---------------------------------
Brings words and photos together (easily) with
 PhotoMail  - it's free and works with Yahoo! Mail.

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

* Re: relation does not exist
  2006-02-21 19:17 relation does not exist eric cartman <panefsky@yahoo.com>
@ 2006-02-21 19:29 ` Mark Lewis <mark.lewis@mir3.com>
  2006-02-22 10:48   ` relation does not exist eric cartman <panefsky@yahoo.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Mark Lewis @ 2006-02-21 19:29 UTC (permalink / raw)
  To: eric cartman <panefsky@yahoo.com>; +Cc: pgsql-jdbc

Did you create the tables using case-sensitive names, such as:

create table "MyTable" ... ?

If this is the case, then you would see some upper-case letters in the
results from DatabaseMetaData.getTables(), and in order to use the
tables in any queries you would always need to quote the table names and
use correct case, since unquoted identifier names are always forced to
lower case in PostgreSQL.

-- Mark Lewis

On Tue, 2006-02-21 at 11:17 -0800, eric cartman wrote:
> Hello to everyone,
>  
> I have a small problem using PostgreSQL.
> The problem is that I create a database and some tables through ant
> and an .sql file.
> Then by using DatabaseMetaData class and method getTables(..)I can
> make a list of the newly created tables, implying that everything
> worked fine.
>  
> But when I am trying to Insert values into tables, i get the message
> 'relation <name> does not exist'.
>  
> How can this be possible?
>  
>  
> Thank you all in advance.
>  
> T.Panos
> 
> 
> ______________________________________________________________________
> Brings words and photos together (easily) with
> PhotoMail  - it's free and works with Yahoo! Mail.



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

* relation does not exist
  2006-02-21 19:17 relation does not exist eric cartman <panefsky@yahoo.com>
  2006-02-21 19:29 ` Re: relation does not exist Mark Lewis <mark.lewis@mir3.com>
@ 2006-02-22 10:48   ` eric cartman <panefsky@yahoo.com>
  0 siblings, 0 replies; 4+ messages in thread

From: eric cartman @ 2006-02-22 10:48 UTC (permalink / raw)
  To: pgsql-jdbc

I am afraid you are right.
  The tables were created with quotes like
  CREATE TABLE "name" 
  The getTables() method returns only name without quotes..
   
  Thank you all.
  


		
---------------------------------
 Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.

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

* Re: relation does not exist
  2006-02-21 19:17 relation does not exist eric cartman <panefsky@yahoo.com>
@ 2006-02-21 20:00 ` Kris Jurka <books@ejurka.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Kris Jurka @ 2006-02-21 20:00 UTC (permalink / raw)
  To: eric cartman <panefsky@yahoo.com>; +Cc: pgsql-jdbc



On Tue, 21 Feb 2006, eric cartman wrote:

> Hello to everyone,
>
>  The problem is that I create a database and some tables through ant and 
> an .sql file.  Then by using DatabaseMetaData class and method 
> getTables(..)I can make a list of the newly created tables, implying
> that everything worked fine.
>
>  But when I am trying to Insert values into tables, i get the message 
> 'relation <name> does not exist'.
>

getTables will tell you about all tables in all schemas.  Perhaps there's 
a table that is not in your search_path when you try and insert into it.

Kris Jurka




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


end of thread, other threads:[~2006-02-22 10:48 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-21 19:17 relation does not exist eric cartman <panefsky@yahoo.com>
2006-02-21 19:29 ` Mark Lewis <mark.lewis@mir3.com>
2006-02-22 10:48   ` eric cartman <panefsky@yahoo.com>
2006-02-21 20:00 ` Kris Jurka <books@ejurka.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