Thread: Finding FOREIGN KEY constraints via information_schema

Finding FOREIGN KEY constraints via information_schema

From
Harald Fuchs
Date:
I'm trying to find out which columns of which tables reference which
columns of which tables by querying the information_schema.  I found
the referencing columns in key_column_usage and the referenced columns
in constraint_column_usage - fine so far.

Now consider the following:

  CREATE TABLE t1 (
    id1 INT NOT NULL,
    id2 INT NOT NULL,
    PRIMARY KEY (id1, id2)
  );

  CREATE TABLE t2 (
    id1 INT NOT NULL,
    id2 INT NOT NULL,
    CONSTRAINT t2_id_fk FOREIGN KEY (id1, id2) REFERENCES t1 (id1, id2)
  );

PostgreSQL groks that, and pg_dump correctly generates

  ALTER TABLE ONLY t2
  ADD CONSTRAINT t2_id_fk FOREIGN KEY (id1, id2) REFERENCES t1(id1, id2);

My problem is that, while key_column_usage knows the ordinal_position,
constraint_column_usage doesn't.  How can I find out that it's really
  REFERENCES t1(id1, id2)
and not
  REFERENCES t1(id2, id1)
instead?

Installation problem with the version 8.0.2

From
"K.RajaSekar"
Date:
Hi

I am trying to install the 8.0.2 version in windows 2000 server. After
opening the installer, I have got the welcome screen. I have selected the
Language English/English in the welcome screen and clicked the start button.
I am getting the following error.

"There is a problem with this windows installer package. A DLL required for
this install to complete could not be run. Contact your support personnel or
package vendor."

What could be the problem?. While replying to this mail, I am requesting
everyone, please send your reply to sekar@kinshiptech.com

Regards
K.RajaSekar


Re: Installation problem with the version 8.0.2

From
Akbar
Date:
http://www.microsoft.com/downloads/details.aspx?FamilyID=4b6140f9-2d36-4977-8fa1-6f8a0f5dca8f&DisplayLang=en


On Mon, 2005-04-25 at 15:37 +0530, K.RajaSekar wrote:
> Hi
>
> I am trying to install the 8.0.2 version in windows 2000 server. After
> opening the installer, I have got the welcome screen. I have selected the
> Language English/English in the welcome screen and clicked the start button.
> I am getting the following error.
>
> "There is a problem with this windows installer package. A DLL required for
> this install to complete could not be run. Contact your support personnel or
> package vendor."
>
> What could be the problem?. While replying to this mail, I am requesting
> everyone, please send your reply to sekar@kinshiptech.com
>
> Regards
> K.RajaSekar
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>