Search Postgresql Archives

Polymorphic queries

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

maybe someone has an idea upon this:

I have a table which has quite a few inheriting tables which have inheriting tables etc (it's
mirroring a OOP model).

As expected, most queries are polymorphic, so they are going against the parent tables.

I'm searching for an idea how to query _once_ and, if the result hits one of the inheriting
tables, put the additional columns of them into a JSON or array structure, to avoid having to
query again to fetch the inheriting tables. I know that this would be possible with querying the
whole hierarchy via unions, but it seems extremely clumsy.

Does anyone have a solution for this or can push me in the right direction?

- -- 
tia,

Patric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: GnuPT 2.5.2

iEYEARECAAYFAlWa7lUACgkQfGgGu8y7ypA5BACfY5oaQwRyvaF4QRdM2BG9Oj1p
HtMAoPNxCysjAeRAJOs5rVbqpoxRmF9M
=97f7
-----END PGP SIGNATURE-----


-- 
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