Thread: Error creating a table

Error creating a table

From
Dale Seaburg
Date:
I am in pgAdmin, attempting to create a table in an existing database.
This table is normally created and deleted by software I have written (C#).
I get this kind of error when executing the CREATE TABLE script (which 
is a copy of similarly named table):

NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 
"public_rowkey" for table "ABSTRACT-SERVER_runsheet"

ERROR:  relation "public_rowkey" already exists

********** Error **********

ERROR: relation "public_rowkey" already exists
SQL state: 42P07

I have looked for rowkey in the "public" schema, but find nothing.
What can be the problem?  What might I be doing wrong?  I'm not sure 
what to do.

Dale



Re: Error creating a table

From
"Joshua D. Drake"
Date:
On 01/02/2018 02:38 PM, Dale Seaburg wrote:
> le):
>
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 
> "public_rowkey" for table "ABSTRACT-SERVER_runsheet"
>
> ERROR:  relation "public_rowkey" already exists
>
> ********** Error **********
>
> ERROR: relation "public_rowkey" already exists
> SQL state: 42P07
>
> I have looked for rowkey in the "public" schema, but find nothing.
> What can be the problem?  What might I be doing wrong?  I'm not sure 
> what to do.

I don't use PgAdmin but the error appears to be looking for 
public_rowkey not public.rowkey. Further, it isn't a table you would be 
looking for but an index.

Thanks,

JD

>
> Dale
>
>

-- 
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc

PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
*****     Unless otherwise stated, opinions are my own.   *****