Re: constraints and sql92 information_schema compliance

From: "Clark C(dot) Evans" <cce(at)clarkevans(dot)com>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: "Clark C(dot) Evans" <cce(at)clarkevans(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: constraints and sql92 information_schema compliance
Date: 2006-03-15 07:31:33
Message-ID: 20060315073133.GA6550@prometheusresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 14, 2006 at 11:11:29PM -0800, Stephan Szabo wrote:
| When we're allowing other order access, immediately reorder the
| constraint information to match the primary key order.

Let me try to parrot. In PostgreSQL, the pairing information between
the foreign-key and unique-key constraint is available; even though it
isn't represented in the information_schema. Hence, this option
re-orders the foreign-key columns to match the corresponding canidate
key constraint (unique _or_ foreign key). If so, I like it.

| This helps out
| with IS since the loaded constraint should display properly, but
| theoretically could change the visual representation after load for people
| who don't care about this option.

I doubt that the actual ordering of the columns in the foreign
key constraint matters to people; so I don't see a downside with
this option other than the perhaps unexpected difference.

| Change the representation unconditionally on dump. Basically reorder the
| constraint at dump time to always generate a dump in SQL03 order. This has
| the same downside as the above except only after another dump/restore.

You could do both?

| Change the representation on dump only if the flag is set (probably
| exporting this as an option to pg_dump as well). This could be a little
| more difficult to use, but pretty much causes the user to drive the
| choice.

Hmm. I just cannot think of a reason why someone would even care
that the columns in their foreign-key constraint create get
re-orderd as long as the behavior is the same.

Best,

Clark

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2006-03-15 07:57:40 Re: constraints and sql92 information_schema compliance
Previous Message Stephan Szabo 2006-03-15 07:11:29 Re: constraints and sql92 information_schema compliance