Re: C function proposal redux

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: mlw <markw(at)mohawksoft(dot)com>
Cc: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: C function proposal redux
Date: 2000-12-13 08:03:24
Message-ID: Pine.LNX.3.96.1001213084810.2387A-100000@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Wed, 13 Dec 2000, mlw wrote:

> I propose we modify C functions for 7.2.

Too simple imagine anything, but often difficult do it :-)

> (1) C functions should be able to return multiple values.

for 7.2 / 7.3 are planned functions return tuples, but do it
is really diffucult. See the current source...

> (2) A setup and breakdown function should be able to be called
> surrounding the query set in which a function is called. This allows
> constructors and destructors.

Why? Can you show any example where is it needful? If you really
need an init/destroy, you can use:

SELECT my_init();
..query...
SELECT my_destroy();

> (3) A function should be able to tell Postgres how to use it. For
> instance:
>
> select * from table where column = function();
>
> Should be able to instruct Postgres to either take the value returned
> and search that one value (allowing index match against the value), or
> perform a table scan against the function each time. Both behaviors are
> important. Currently a function seems to force a table scan.

Here I not undestand. We have 'iscacheable' - or what you mean?

Karel

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabio Nanni 2000-12-13 09:35:57 triggers and actions tree/2
Previous Message Christopher Kings-Lynne 2000-12-13 07:27:44 Bug in ILIKE function?