Foreign key to column on same table at table creation time - Mailing list pgadmin-support

From Thom Brown
Subject Foreign key to column on same table at table creation time
Date
Msg-id bddc86150910040756h1bdd076ev27ea0bb32f16d70a@mail.gmail.com
Whole thread Raw
Responses Re: Foreign key to column on same table at table creation time
List pgadmin-support
I've noticed (at least in pgAdmin III v1.8.4) that I can't create a foreign key constraint pointing to the table I'm in the process of creating.  I can do it manually though.  Here's an example:

CREATE TABLE testtable
(
  id serial NOT NULL,
  parent_id integer,
  CONSTRAINT pk_testtable_id PRIMARY KEY (id),
  CONSTRAINT fk_testtable_parent_id FOREIGN KEY (parent_id)
      REFERENCES testtable (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)

I could achieve this if I create the table then apply the foreign key, but it would be nice to be able to do this one step.  Is it possible to add this for a future release?

Thanks

Thom

pgadmin-support by date:

Previous
From: Piaff33z
Date:
Subject: ERROR: unrecognized configuration parameter "shared_preload_libraries"
Next
From: Guillaume Lelarge
Date:
Subject: Re: ERROR: unrecognized configuration parameter "shared_preload_libraries"