relations does not exist

Started by CaseTover 18 years ago4 messagesgeneral
Jump to latest
#1CaseT
ctorres@quantumcomposers.com

Hi,

I doing a simple insert into a table re Perl/DBI
"INSERT INTO party (party_id, party_type_id, description, status_id)
VALUES ($partyId, 'PERSON', 'Initial Import','PARTY_ENABLED')

and I'm getting a
"ERROR: relations "party" does not exist"
I get the same error message in pgadmin.

The table "party" certainly exists.

I have searched for answers without any luck.
Anyone know what might be going on and how to fix it?

Thanks in advance, Case

--
View this message in context: http://www.nabble.com/relations-does-not-exist-tf4636218.html#a13240608
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

#2Alan Hodgson
ahodgson@simkin.ca
In reply to: CaseT (#1)
Re: relations does not exist

On Tuesday 16 October 2007, ctorres <ctorres@quantumcomposers.com> wrote:

Hi,

I doing a simple insert into a table re Perl/DBI
"INSERT INTO party (party_id, party_type_id, description, status_id)
VALUES ($partyId, 'PERSON', 'Initial Import','PARTY_ENABLED')

and I'm getting a
"ERROR: relations "party" does not exist"
I get the same error message in pgadmin.

The table "party" certainly exists.

Are you really connecting to the database you think you are?

--
Peak Oil is now accepted as inevitable, and the debate only becomes as
to when - James Schlesinger, former US Secretary of Energy

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: CaseT (#1)
Re: relations does not exist

On Tuesday 16 October 2007 12:20 pm, ctorres wrote:

Hi,

I doing a simple insert into a table re Perl/DBI
"INSERT INTO party (party_id, party_type_id, description, status_id)
VALUES ($partyId, 'PERSON', 'Initial Import','PARTY_ENABLED')

and I'm getting a
"ERROR: relations "party" does not exist"
I get the same error message in pgadmin.

The table "party" certainly exists.

I have searched for answers without any luck.
Anyone know what might be going on and how to fix it?

Thanks in advance, Case

Two things come to mind.
1) Do you have the necessary permissions to access the schema table 'party'
is in?
2) How was the name for 'party' originally entered? It could be a case
sensitive problem. See
http://www.postgresql.org/docs/8.2/interactive/sql-syntax-lexical.html
Section 4.1.1 for a complete explanation. Basically if the table name was
entered with quotes in a form other than 'party' then selecting for 'party'
will result in the error above.

--
Adrian Klaver
aklaver@comcast.net

#4Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Adrian Klaver (#3)
Re: relations does not exist

Adrian Klaver wrote:

I doing a simple insert into a table re Perl/DBI
"INSERT INTO party (party_id, party_type_id, description, status_id)
VALUES ($partyId, 'PERSON', 'Initial

Import','PARTY_ENABLED')

and I'm getting a
"ERROR: relations "party" does not exist"
I get the same error message in pgadmin.

The table "party" certainly exists.

Two things come to mind.
1) Do you have the necessary permissions to access the
schema table 'party' is in?
2) How was the name for 'party' originally entered? It could
be a case sensitive problem. See
http://www.postgresql.org/docs/8.2/interactive/sql-syntax-lexical.html
Section 4.1.1 for a complete explanation. Basically if the
table name was entered with quotes in a form other than 'party' then
selecting for 'party' will result in the error above.

Other possibilities:

- Your schema search_path is set to not include the schema that
contains the table.
- You are in the wrong database.

What is the exact command with which you prove your claim that
'The table "party" certainly exists'?

Is this command issued as the same user that runs the insert?

Yours,
Laurenz Albe