Re: How to discover foreign keys (without pulling hair out)
От | bob lapique |
---|---|
Тема | Re: How to discover foreign keys (without pulling hair out) |
Дата | |
Msg-id | GV4IL0$C9D156E91C6CCD1198F670F63041C3D5@tiscali.fr обсуждение исходный текст |
Ответ на | How to discover foreign keys (without pulling hair out) (Ian Morgan <imorgan@webcon.net>) |
Ответы |
Re: How to discover foreign keys (without pulling hair out)
|
Список | pgsql-sql |
Hi, I use pgAdminII on Windows. It connects to a PostgreSQL on a Linux PC. When you click on an existing table's icon, it shows you a script that could have created it (it detects the structure of the table by itself), including the foreign keys. That's an easy way. But maybe not very elegant... -- Table: slip CREATE TABLE "slip" ( "id_slip" int4 DEFAULT nextval ('"slip_id_slip_seq"'::text) NOT NULL, "proprio" int4, CONSTRAINT "slip_pkey" PRIMARY KEY ("id_slip"), CONSTRAINT "slip_de"FOREIGN KEY ("proprio") REFERENCES "maitre" ("maitre_id") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE ); COMMENT ON TABLE "slip" IS 'les slobards en folie !'; ------------------- Vous aussi devenez le "Coup de coeur de Julie" et gagnez une Webcam sur http://www.chez.com ! Chez.com vous invite � d�couvrir l'univers passionnant des sites persos.
В списке pgsql-sql по дате отправления: