can a function return a virtual table?

Поиск
Список
Период
Сортировка
От Kai Hessing
Тема can a function return a virtual table?
Дата
Msg-id 3c4m1vF6b6e6aU1@individual.net
обсуждение исходный текст
Ответы Re: can a function return a virtual table?  (Michael Fuhr <mike@fuhr.org>)
Re: can a function return a virtual table?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-sql
This is the question i'm telling myself. It is because we don't really
delete table entries, just setting a status field to '-1'. So a valid
select would look like: SELECT xyz, abc FROM (SELECT * FROM tablex WHERE
status > -1);
It would be much nicer to have to write something like: SELECT xyz, abc
FROM active(tablex); where the function 'active(x)' returns a virtual
table with all entries from table x where status is > -1. But sadly I
have no idea how write such a function. Good old O'reilly can't help (or
i'm to dumb *g*).



-- 
GnuPG-PublicKey -> http://www.hobsons.de/pgp/kai_hessing.asc

Bei seinen Handlungen ist vorzubedenken besser als nachzubedenken.
(Demokrit, um 460 v. Chr.)


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

Предыдущее
От: "Matt Fulford"
Дата:
Сообщение: SQL subquery (count distinct) - Any Ideas?
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: Getting the output of a function used in a where clause