"Oliver Elphick" <olly@lfix.co.uk> writes:
> bray=# SELECT DISTINCT p.id, p.name, a.town
> bray-# FROM (
> bray(# SELECT id, name
> bray(# FROM customer
> bray(# UNION
> bray(# SELECT id, name
> bray(# FROM supplier
> bray(# ) AS p
> bray-# LEFT OUTER JOIN address AS a
> bray-# ON p.address = a.id
> bray-# WHERE p.id = '22002';
> ERROR: function applied to tuple is not supported for subSELECTs
> What does the error message mean?
table.functionname is an ancient PostQUEL notation for functions that
take whole tuples --- think "address(p)" and you'll have a better idea
what the parser is seeing here.
This notation is something we're probably going to have to retire soon,
since I doubt it will play well with schema notation (too hard to guess
what foo.bar.baz means). I doubt anyone but the regression tests still
use the PostQUEL notation for function calls anyway.
regards, tom lane