From: | "Richard Huxton" <dev(at)archonet(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org>, "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk> |
Subject: | Re: Re: Is this a bug in 7.1? |
Date: | 2001-03-13 12:46:47 |
Message-ID: | 006e01c0abbb$abf702e0$1001a8c0@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
> "Oliver Elphick" wrote:
> >Is this a bug or missing feature in 7.1? or have I got the SQL
> >wrong?
> >
> >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';
>
> The SQL was wrong; I had missed out "address" from the fields in the
> subselect. However, the error message was very misleading:
>
> >ERROR: function applied to tuple is not supported for subSELECTs
> >
> >What does the error message mean? I can't see where a function
> >is involved.
Misleading, but does make some sense. Looks like you can define a function
with a table-name as parameter and use it as though an attribute:
create function foo(tbl) returns...
select tbl.foo;
Seems to call the function foo(...) - something to do with defining your own
types?
- Richard Huxton
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Wood | 2001-03-13 12:51:29 | Re: Create trigger problem : |
Previous Message | Marko Kreen | 2001-03-13 12:34:59 | Re: postgresql to mysql conversion? |