pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Problem with old relation
3+ messages / 3 participants
[nested] [flat]

* Re: Problem with old relation
@ 2003-05-02 12:08  Andreas Schmitz <a.schmitz@cityweb.de>
  parent: Rado Petrik <r.p@szm.sk>
  1 sibling, 0 replies; 3+ messages in thread

From: Andreas Schmitz @ 2003-05-02 12:08 UTC (permalink / raw)
  To: Rado Petrik <r.p@szm.sk>; pgsql-sql


Hi,

you also have to drop the sequence.

drop sequence kokot_kokot_seq;


regards

-andreas



On Friday 02 May 2003 14:20, Rado Petrik wrote:
> Hi,
>
> 1) When I create new table expample.
>
> CREATE TABLE "kokot" (
> "kokot" SERIAL );
>
>
> 2) and then DROP table kokot ..
>
> 3) and then again CREATE table
>
> CREATE TABLE "kokot" (
> "kokot" SERIAL );
>
> PostgreSQL return this error
>
> PostgreSQL said: ERROR: Relation 'kokot_kokot_seq' already exists
> Your query:
> CREATE TABLE "kokot" (
> "kokot" SERIAL );
>
> Where is problem ?
> Thanks
>
> Rado

-- 
Andreas Schmitz - Phone +49 201 8501 318
Cityweb-Technik-Service-Gesellschaft mbH
Friedrichstr. 12 - Fax +49 201 8501 104
45128 Essen - email a.schmitz@cityweb.de




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

* Problem with old relation
@ 2003-05-02 12:20  Rado Petrik <r.p@szm.sk>
  0 siblings, 2 replies; 3+ messages in thread

From: Rado Petrik @ 2003-05-02 12:20 UTC (permalink / raw)
  To: pgsql-sql

Hi, 

1) When I create new table expample.

CREATE TABLE "kokot" (
"kokot" SERIAL );


2) and then DROP table kokot ..

3) and then again CREATE table 

CREATE TABLE "kokot" (
"kokot" SERIAL );

PostgreSQL return this error 

PostgreSQL said: ERROR: Relation 'kokot_kokot_seq' already exists
Your query:
CREATE TABLE "kokot" (
"kokot" SERIAL );

Where is problem ?
Thanks 

Rado 
-- 
Rado Petrik <r.p@szm.sk>




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

* Re: Problem with old relation
@ 2003-05-02 12:54  A.Bhuvaneswaran <bhuvansql@myrealbox.com>
  parent: Rado Petrik <r.p@szm.sk>
  1 sibling, 0 replies; 3+ messages in thread

From: A.Bhuvaneswaran @ 2003-05-02 12:54 UTC (permalink / raw)
  To: Rado Petrik <r.p@szm.sk>; +Cc: pgsql-sql

> PostgreSQL said: ERROR: Relation 'kokot_kokot_seq' already exists

In pre 7.3, you should drop the sequence as well. It is fixed in 7.3. Thus
in 7.3, if you drop a table its dependent objects like sequences, FKs are
dropped automatically.

regards,
bhuvaneswaran




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


end of thread, other threads:[~2003-05-02 12:54 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-02 12:20 Problem with old relation Rado Petrik <r.p@szm.sk>
2003-05-02 12:08 ` Andreas Schmitz <a.schmitz@cityweb.de>
2003-05-02 12:54 ` A.Bhuvaneswaran <bhuvansql@myrealbox.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