Re: Query about foreign key details for php framework

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: David Binney <donkeysoft(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Query about foreign key details for php framework
Date: 2016-02-27 15:20:06
Message-ID: 56D1BEA6.5020707@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 02/26/2016 08:29 PM, David Binney wrote:
> Hey adrian,
>
> You are correct that the distinct will chomp the resultset down to the
> correct count, I am just concerned that there will be cases where it
> might not be accurate between the "rc" and the "kcu" joins as there is
> no table reference. I have simplified the query right down to just the
> join that i am unsure about. You can see below that as soon as i add the
> rc.unique_constraint_name, the distinct is no longer returning one row.
> In this case its fine because the rc values are the same and would
> distinct away, but there might be a case where they are diferent and you
> would have two rows and not know which values are correct?
>

Well it comes down to the question that was asked several times upstream:

what is the information you want to see?

I am not talking about a query, but a description of what attributes you
want on what database objects.

Also given, from previous post:

"I am a little in the dark as well since this is just a broken piece of
ORM i am attempting to fix, in the framework."

Is this not something that should be discussed with the framework
developers, or are we already doing that:)?

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stuart 2016-02-28 09:30:35 Re: Query about foreign key details for php framework
Previous Message David G. Johnston 2016-02-27 07:56:47 Re: Query about foreign key details for php framework