Search Postgresql Archives

Re: Getting reference key elements in right orders

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



seiliki@xxxxxxxxxxxxx writes:
> I need to know the match columns of referencing and referenced keys. 

The query you show definitely won't match them up correctly, since that
=ANY test is not order-sensitive.  What you need to do is generate the
integers from 1 to array_length(conkey) and then join on attnum =
conkey[i], rather than using =ANY.  You can find some examples in the
information_schema views.  (In fact, you might well find that the
information_schema views are close enough already to what you need.)

			regards, tom lane

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux