Re: Wishlist?

Поиск
Список
Период
Сортировка
От Ezequiel Tolnay
Тема Re: Wishlist?
Дата
Msg-id dc1g0b$uil$1@news.hub.org
обсуждение исходный текст
Ответ на Re: Wishlist?  (Roman Neuhauser <neuhauser@sigpipe.cz>)
Список pgsql-general
Roman Neuhauser wrote:
>     What would your hassle-free CREATE OR REPLACE do in this situation?
>     What should the fiew look like after you replace foo() with
>     foo(int4)?
>
>     CREATE TYPE t1 AS (
>      a INTEGER,
>      b INTEGER,
>      c INTEGER
>     );
>     CREATE TYPE t1 AS (
>      a TEXT,
>      c TEXT
>     );
>
>     CREATE FUNCTION foo() RETURNS SETOF t1 ...
>
>     CREATE VIEW fiew AS SELECT a * b, c FROM SELECT foo();
>
>     CREATE OR REPLACE FUNCTION foo(INTEGER) RETURNS SETOF t2 ...

In this case it would not allow the replace, since the function has both
type and interface dependencies and you're changing both the type and
the interface.

The idea is to use the NOOVERLOAD feature on functions that would be
used as an interface for the front-end, where the addition or
modification of a parameter or a result column is quite common, and
functions very rarely need or use overloading features.

Please have a look at my reply to the sister thread.

Cheers,

Ezequiel Tolnay

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

Предыдущее
От: Ezequiel Tolnay
Дата:
Сообщение: Re: Wishlist?
Следующее
От: Jeffrey Cook
Дата:
Сообщение: PGSQL programmer needed!!!