Re: views with parameters

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: views with parameters
Дата
Msg-id 20041127210003.GA31115@wolff.to
обсуждение исходный текст
Ответ на views with parameters  ("Thomas Hermann(Software)" <hth@sprintsoft.de>)
Список pgsql-novice
On Sat, Nov 27, 2004 at 21:07:03 +0100,
  "Thomas Hermann(Software)" <hth@sprintsoft.de> wrote:
>
> Much to my dismay the documentation does not specify any
> parameters/arguments which can be used with views.  But views do retun a
> complete record or record sets as defined in pg.

That doesn't make much sense. Views look like tables. Tables don't
have arguments or parameters. If you want a subset of the records
defined by a view, you can use the where clause.

> One can send arguments with functions, but by whatever reason (and return
> type), i have not been able to get anything back which compares to what
> comes back from an ordinary select oder view. Best i got: a colon separated
> string having all the data in one field (although a special type was
> referenced etc.)

Recent versions from Postgres allow set returning functions. You can use these
in the from item list. I don't use these, but my memory is that there have
been some significant improvements for version 8.0, so you might want to
look at the 8.0 beta for your initial development. 8.0 will probably be
released in a month.

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

Предыдущее
От: Michael Guerin
Дата:
Сообщение: Re: ERROR: duplicate key violates unique constraint "pg_type_typname_nsp_index"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: duplicate key violates unique constraint "pg_type_typname_nsp_index"