Discussion:
PG composite types: select with table alias
(too old to reply)
a***@ukr.net
2015-06-30 19:46:31 UTC
Permalink
I`m trying to select a PG composite type fields in a select with table alias:

SELECT id,
env.(EnabledTracking).changedby -- <<<<< here the error referrs
FROM environment env
WHERE env.environmentId = 4

but PG gives an error 'syntax error at or near "("'. I can`t remove the alias as SQL is auto-generated by ORM.

Is there a way to use composite types in select with table alias? No documentation was found regarding this issue.
a***@ukr.net
2015-07-01 17:45:49 UTC
Permalink
It should like this:
...
(env.EnabledTracking).changedby

Loading...