Re: Foreign key match is unknown when using with postgresql 9.3b2 - Mailing list pgadmin-support

From Neel Patel
Subject Re: Foreign key match is unknown when using with postgresql 9.3b2
Date
Msg-id CAMcbDBFtLfO53CLwooTvtMnRcOpvKrSmST-6NbYC3+o68Z=6ig@mail.gmail.com
Whole thread Raw
In response to Re: Foreign key match is unknown when using with postgresql 9.3b2  (Neel Patel <neel.patel@enterprisedb.com>)
Responses Re: Foreign key match is unknown when using with postgresql 9.3b2  (Dave Page <dpage@pgadmin.org>)
List pgadmin-support
Hi Dave,

We just go through code and following are the findings.

Issue :- 

To find out the constraint we are using pg_constraint class. In PG 9.2 valid values for "confmatchtype" column in pg_constraint class is (f = full, p = partial, u = simple) But for PG 9.3 valid values are (f = full, p = partial, s = simple).

Because of the above change in PG 9.3 our pgAdmin below logic will fail in pgForeignKey.cpp file and it shows value "MATCH UNKNOWN" in SQL Pane.

foreignKey->iSetMatch(

match.IsSameAs('f') ? wxT("FULL") :

match.IsSameAs('u') ? wxT("SIMPLE") : wxT("Unknown"));


Solution:-

In above code we are comparing values "f" and "u" now we have to add one more case for "s".


Below is the documentation link for PG 9.2 and PG 9.3 for reference.

http://www.postgresql.org/docs/9.2/static/catalog-pg-constraint.html

http://www.postgresql.org/docs/9.3/static/catalog-pg-constraint.html


Please suggest.


Thanks,

Neel Patel






On Mon, Aug 19, 2013 at 3:50 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Yes Sure Ashesh.

I will look at it.

Thanks,
Neel Patel


On Mon, Aug 19, 2013 at 3:24 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
Neel,

Please take a look at it as Dinesh is on leave.


On Mon, Aug 19, 2013 at 2:17 PM, Dave Page <dpage@pgadmin.org> wrote:
Dinesh, can you take a look at this please?

Thanks.

On Thu, Aug 15, 2013 at 9:32 AM, Attila Soki <atiware@gmx.net> wrote:
> hi,
>
> when used with postgresql 9.3, pgadmin shows in table definition
> ...
> CONSTRAINT xy_fkey FOREIGN KEY (xy_id)
>       REFERENCES tablename (xy_id) MATCH Unknown
>
> insead of
> MATCH SIMPLE
>
>
> before 9.3 for MATCH SIMPLE was confmatchtype=u
> since postgresql 9.3 is confmatchtype=s
>
> cheers,
> Attila Soki
>
>
>
> --
> Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support



--
--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA:
Enterprise PostgreSQL Company

 

http://www.linkedin.com/in/asheshvashi



pgadmin-support by date:

Previous
From: Neel Patel
Date:
Subject: Re: Foreign key match is unknown when using with postgresql 9.3b2
Next
From: Dave Page
Date:
Subject: Re: Password setting having somewhat bizarre results.