Thread: Foreign key match is unknown when using with postgresql 9.3b2

Foreign key match is unknown when using with postgresql 9.3b2

From
Attila Soki
Date:
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




Re: Foreign key match is unknown when using with postgresql 9.3b2

From
Dave Page
Date:
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



Re: Foreign key match is unknown when using with postgresql 9.3b2

From
Ashesh Vashi
Date:
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

Re: Foreign key match is unknown when using with postgresql 9.3b2

From
Neel Patel
Date:
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


Re: Foreign key match is unknown when using with postgresql 9.3b2

From
Neel Patel
Date:
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



Re: Foreign key match is unknown when using with postgresql 9.3b2

From
Dave Page
Date:
Thanks, fixed.


On Mon, Aug 19, 2013 at 1:00 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
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






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

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