Thread: Relation XX does not exist

Relation XX does not exist

From
Matt Allen
Date:
Hi Guys,

Just started using PG today, bought the book and all was cruising along well untill i got the following error:

Relation 'jobdetails' does not exist

when i issued:

INSERT INTO jobdetails (jobDetailsID, jobID, claimName , claimNumber ,placementDate , completionDate, invType ,
insType)values  
(7, 72,'P1234','Mr T',986453483,988639200, 'S', 'W')

All seems to be right here:

impmp=> \d
         List of relations
      Name      |   Type   | Owner
----------------+----------+-------
 jobDetails     | table    | impmp
 jobdetails_seq | sequence | impmp
 jobs           | table    | impmp
 jobs_seq       | sequence | impmp
(4 rows)

Any clues ? Ive restarted the SQL server and to no avail.

Thanks.
Matt

Re: Relation XX does not exist

From
"Poul L. Christiansen"
Date:
PostgreSQL is case sensetive, so jobdetails is not the same as jobDetails.

Poul L. Christiansen

On Thu, 5 Apr 2001, Matt Allen wrote:

> Hi Guys,
>
> Just started using PG today, bought the book and all was cruising along well untill i got the following error:
>
> Relation 'jobdetails' does not exist
>
> when i issued:
>
> INSERT INTO jobdetails (jobDetailsID, jobID, claimName , claimNumber ,placementDate , completionDate, invType ,
insType)values  
> (7, 72,'P1234','Mr T',986453483,988639200, 'S', 'W')
>
> All seems to be right here:
>
> impmp=> \d
>          List of relations
>       Name      |   Type   | Owner
> ----------------+----------+-------
>  jobDetails     | table    | impmp
>  jobdetails_seq | sequence | impmp
>  jobs           | table    | impmp
>  jobs_seq       | sequence | impmp
> (4 rows)
>
> Any clues ? Ive restarted the SQL server and to no avail.
>
> Thanks.
> Matt
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


Re: Relation XX does not exist

From
Anand Raman
Date:
Hi Poul
i guess u are gravely mistaken..
The table names in pgsql are not case sentive they are all case
insentive..b Try it out. However if u enclose the name in quotes and
create the table then it is case sensitive.. To access such tables u
willalways have to enclose then in quotes..

Anand

On Thu, Apr 05, 2001 at 08:28:43AM +0200, Poul L. Christiansen wrote:
>PostgreSQL is case sensetive, so jobdetails is not the same as jobDetails.
>
>Poul L. Christiansen
>
>On Thu, 5 Apr 2001, Matt Allen wrote:
>
>> Hi Guys,
>>
>> Just started using PG today, bought the book and all was cruising along well untill i got the following error:
>>
>> Relation 'jobdetails' does not exist
>>
>> when i issued:
>>
>> INSERT INTO jobdetails (jobDetailsID, jobID, claimName , claimNumber ,placementDate , completionDate, invType ,
insType)values  
>> (7, 72,'P1234','Mr T',986453483,988639200, 'S', 'W')
>>
>> All seems to be right here:
>>
>> impmp=> \d
>>          List of relations
>>       Name      |   Type   | Owner
>> ----------------+----------+-------
>>  jobDetails     | table    | impmp
>>  jobdetails_seq | sequence | impmp
>>  jobs           | table    | impmp
>>  jobs_seq       | sequence | impmp
>> (4 rows)
>>

Re: Relation XX does not exist

From
"Poul L. Christiansen"
Date:
You are right when it comes to the psql client, but I'm using ODBC on MS
Windows (with Cold Fusion and PgAdmin) and maybe he is using clients other
than psql to insert into PostgreSQL that has this problem.

Poul L. Christiansen

On Thu, 5 Apr 2001, Anand Raman wrote:

> Hi Poul
> i guess u are gravely mistaken..
> The table names in pgsql are not case sentive they are all case
> insentive..b Try it out. However if u enclose the name in quotes and
> create the table then it is case sensitive.. To access such tables u
> willalways have to enclose then in quotes..
>
> Anand
>
> On Thu, Apr 05, 2001 at 08:28:43AM +0200, Poul L. Christiansen wrote:
> >PostgreSQL is case sensetive, so jobdetails is not the same as jobDetails.
> >
> >Poul L. Christiansen
> >
> >On Thu, 5 Apr 2001, Matt Allen wrote:
> >
> >> Hi Guys,
> >>
> >> Just started using PG today, bought the book and all was cruising along well untill i got the following error:
> >>
> >> Relation 'jobdetails' does not exist
> >>
> >> when i issued:
> >>
> >> INSERT INTO jobdetails (jobDetailsID, jobID, claimName , claimNumber ,placementDate , completionDate, invType ,
insType)values  
> >> (7, 72,'P1234','Mr T',986453483,988639200, 'S', 'W')
> >>
> >> All seems to be right here:
> >>
> >> impmp=> \d
> >>          List of relations
> >>       Name      |   Type   | Owner
> >> ----------------+----------+-------
> >>  jobDetails     | table    | impmp
> >>  jobdetails_seq | sequence | impmp
> >>  jobs           | table    | impmp
> >>  jobs_seq       | sequence | impmp
> >> (4 rows)
> >>
>


Re: Relation XX does not exist

From
Matt Allen
Date:
Hi all,

ive tried the same insert statement on the command line too, with both caps and lower no go.

im connecting to pgsql though PHP compiles as a DSO though apache.

Its on a linux machine.

Matta

On Thu, Apr 05, 2001 at 09:22:28AM +0200, Poul L. Christiansen wrote:
> What client are you using to insert into table jobdetails? what OS are you
> running on the server and on the client?
>
> Try to make the table names using lower case only and see if that works.
>
> Poul L. Christiansen
>
> On Thu, 5 Apr 2001, Matt Allen wrote:
>
> > Hi Paul,
> >
> > Ive tried both neither work.
> >
> > Matt
> >
> > On Thu, Apr 05, 2001 at 08:28:43AM +0200, Poul L. Christiansen wrote:
> > > PostgreSQL is case sensetive, so jobdetails is not the same as jobDetails.
> > >
> > > Poul L. Christiansen
> > >
> > > On Thu, 5 Apr 2001, Matt Allen wrote:
> > >
> > > > Hi Guys,
> > > >
> > > > Just started using PG today, bought the book and all was cruising along well untill i got the following error:
> > > >
> > > > Relation 'jobdetails' does not exist
> > > >
> > > > when i issued:
> > > >
> > > > INSERT INTO jobdetails (jobDetailsID, jobID, claimName , claimNumber ,placementDate , completionDate, invType ,
insType)values  
> > > > (7, 72,'P1234','Mr T',986453483,988639200, 'S', 'W')
> > > >
> > > > All seems to be right here:
> > > >
> > > > impmp=> \d
> > > >          List of relations
> > > >       Name      |   Type   | Owner
> > > > ----------------+----------+-------
> > > >  jobDetails     | table    | impmp
> > > >  jobdetails_seq | sequence | impmp
> > > >  jobs           | table    | impmp
> > > >  jobs_seq       | sequence | impmp
> > > > (4 rows)
> > > >
> > > > Any clues ? Ive restarted the SQL server and to no avail.
> > > >
> > > > Thanks.
> > > > Matt
> > > >
> > > > ---------------------------(end of broadcast)---------------------------
> > > > TIP 3: if posting/reading through Usenet, please send an appropriate
> > > > subscribe-nomail command to majordomo@postgresql.org so that your
> > > > message can get through to the mailing list cleanly
> > > >
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 6: Have you searched our list archives?
> > >
> > > http://www.postgresql.org/search.mpl
> >
> > --
> > Matt Allen
> > Technical Director
> > Investigation Marketplace
> > 0413 777 771
> > matt@investigationmarketplace.com
> >

--
Matt Allen
Technical Director
Investigation Marketplace
0413 777 771
matt@investigationmarketplace.com

RE: Relation XX does not exist

From
"Joseph"
Date:
At the psql prompt you must put double quotes around table names that need
to be case sensitive...

Can you do
    SELECT * FROM "jobDetails";


respectfully,
Joseph

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Matt Allen
> Sent: Thursday, April 05, 2001 5:36 AM
> To: Poul L. Christiansen
> Cc: Matt Allen; postgresql-general@postgresql.org
> Subject: Re: [GENERAL] Relation XX does not exist
>
>
> Hi all,
>
> ive tried the same insert statement on the command line too, with
> both caps and lower no go.
>
> im connecting to pgsql though PHP compiles as a DSO though apache.
>
> Its on a linux machine.
>
> Matta
>
> On Thu, Apr 05, 2001 at 09:22:28AM +0200, Poul L. Christiansen wrote:
> > What client are you using to insert into table jobdetails? what
> OS are you
> > running on the server and on the client?
> >
> > Try to make the table names using lower case only and see if that works.
> >
> > Poul L. Christiansen
> >
> > On Thu, 5 Apr 2001, Matt Allen wrote:
> >
> > > Hi Paul,
> > >
> > > Ive tried both neither work.
> > >
> > > Matt
> > >
> > > On Thu, Apr 05, 2001 at 08:28:43AM +0200, Poul L. Christiansen wrote:
> > > > PostgreSQL is case sensetive, so jobdetails is not the same
> as jobDetails.
> > > >
> > > > Poul L. Christiansen
> > > >
> > > > On Thu, 5 Apr 2001, Matt Allen wrote:
> > > >
> > > > > Hi Guys,
> > > > >
> > > > > Just started using PG today, bought the book and all was
> cruising along well untill i got the following error:
> > > > >
> > > > > Relation 'jobdetails' does not exist
> > > > >
> > > > > when i issued:
> > > > >
> > > > > INSERT INTO jobdetails (jobDetailsID, jobID, claimName ,
> claimNumber ,placementDate , completionDate, invType , insType) values
> > > > > (7, 72,'P1234','Mr T',986453483,988639200, 'S', 'W')
> > > > >
> > > > > All seems to be right here:
> > > > >
> > > > > impmp=> \d
> > > > >          List of relations
> > > > >       Name      |   Type   | Owner
> > > > > ----------------+----------+-------
> > > > >  jobDetails     | table    | impmp
> > > > >  jobdetails_seq | sequence | impmp
> > > > >  jobs           | table    | impmp
> > > > >  jobs_seq       | sequence | impmp
> > > > > (4 rows)
> > > > >
> > > > > Any clues ? Ive restarted the SQL server and to no avail.
> > > > >
> > > > > Thanks.
> > > > > Matt
> > > > >
> > > > > ---------------------------(end of
> broadcast)---------------------------
> > > > > TIP 3: if posting/reading through Usenet, please send an
> appropriate
> > > > > subscribe-nomail command to majordomo@postgresql.org so that your
> > > > > message can get through to the mailing list cleanly
> > > > >
> > > >
> > > >
> > > > ---------------------------(end of
> broadcast)---------------------------
> > > > TIP 6: Have you searched our list archives?
> > > >
> > > > http://www.postgresql.org/search.mpl
> > >
> > > --
> > > Matt Allen
> > > Technical Director
> > > Investigation Marketplace
> > > 0413 777 771
> > > matt@investigationmarketplace.com
> > >
>
> --
> Matt Allen
> Technical Director
> Investigation Marketplace
> 0413 777 771
> matt@investigationmarketplace.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)



Re: Relation XX does not exist

From
Matt Allen
Date:
Hi,

Its all good ... any table name or column with a Cpaital letter in it needs to be enclosed in "" 's ...

Just out of curiostiy, which way do you guys do it?

jobdetails
job_details
or
"jobDetiails"

Thanks,

Matt


On Thu, Apr 05, 2001 at 06:01:54AM +0100, Ryan Mahoney wrote:
> Try using quotes, ie: INSERT INTO "TableName" VALUES......
>
> does that work?
>
> -r
>
*snip*
> > > > > >
> > > > > > Relation 'jobdetails' does not exist
> > > > > >
> > > > > > when i issued:
> > > > > >
> > > > > > INSERT INTO jobdetails (jobDetailsID, jobID, claimName ,
> > claimNumber ,placementDate , completionDate, invType , insType) values
> > > > > > (7, 72,'P1234','Mr T',986453483,988639200, 'S', 'W')
> > > > > >
> > > > > > All seems to be right here:
> > > > > >
> > > > > > impmp=> \d
> > > > > >          List of relations
> > > > > >       Name      |   Type   | Owner
> > > > > > ----------------+----------+-------
> > > > > >  jobDetails     | table    | impmp
> > > > > >  jobdetails_seq | sequence | impmp
> > > > > >  jobs           | table    | impmp
> > > > > >  jobs_seq       | sequence | impmp
> > > > > > (4 rows)
> > > > > >
> > > > > > Any clues ? Ive restarted the SQL server and to no avail.
> > > > > >

Re: Relation XX does not exist

From
Joel Burton
Date:
On Fri, 6 Apr 2001, Matt Allen wrote:

> Hi,
>
> Its all good ... any table name or column with a Cpaital letter in it needs to be enclosed in "" 's ...
>
> Just out of curiostiy, which way do you guys do it?
>
> jobdetails
> job_details
> or
> "jobDetiails"

jobdetails. I don't find it hard to read, and prefer to use underscore
strategically, rather than to separate everyday words.

Typing all the quotes and shifting seems like way too much work, and opens
some confusions with different clients.

--
Joel Burton   <jburton@scw.org>
Director of Information Systems, Support Center of Washington