Re: functions returning sets

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: functions returning sets
Дата
Msg-id 14408.1071518342@sss.pgh.pa.us
обсуждение исходный текст
Ответ на functions returning sets  (Jeff Rogers <jrogers@findlaw.com>)
Ответы Re: functions returning sets
Список pgsql-general
Jeff Rogers <jrogers@findlaw.com> writes:
> However, the documentation says that using a SRF in the select list of
> a query, but this capability is deprecated.  I can't figure out how to
> call this function in the from clause with it referring to a column in
> a table, I get an error like
> ERROR:  FROM function expression may not refer to other relations of same
> query level.  Is there another way to accomplish this?

There isn't any good alternative at the moment (which is why SRFs in
select lists aren't deprecated yet).  There has been some discussion
about implementing SQL99's LATERAL clause to support this, but it's
not done yet.

> select file from xml_files where 'foo' in (select pgxml_xpath(doc,'/top/node'))
> parses, but it doesn't seem to give correct results.

That should work as far as I know.  Can you give more detail?

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Jenny Zhang
Дата:
Сообщение: deadlock detected when inserting data
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Changing user