Re: [rfc] new CREATE FUNCTION (and more) - Mailing list pgsql-hackers

From Philip Warner
Subject Re: [rfc] new CREATE FUNCTION (and more)
Date
Msg-id 3.0.5.32.20001117153342.009ad220@mail.rhyme.com.au
Whole thread Raw
In response to Re: [rfc] new CREATE FUNCTION (and more)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 23:07 16/11/00 -0500, Tom Lane wrote:
>Philip Warner <pjw@rhyme.com.au> writes:
>>
>> - call pg_fmgr_api_version() to get the protocol version
>> - when it wants to call a function 'foo' see if there is a 'pg_api_foo'
>> entry point, and if so, use the new interface, o/wise use the old one. No
>> need to even call it.
>
>This strikes me as completely backwards, because it prejudges an
>assumption that protocol decisions can be made on a library-wide basis.
...
>unsupported assumption that all functions in a given shlib are similar?
>That way reduces flexibility, rather than increasing it.

Not at all. The call is, as you point out, defining the protocl for
enquiry. Nothing more. With 7.1, the process above is sufficient. There is
no need to call *in this version* because pg_fmgr_api_version returns
enough information when combined with the existence of a well-defined entry
point. Future versions would need to call the entry point, I would expect.

If we really wanted to we could let it also return a struct, which could
indicate if all, some or none of the functions in the module have info
functions.

I guess it's not a big issue, and and as you say 'negtiating to negotiate'
is probably overkill. Also, if we really need it in a future version we can
add it easily enough - it's would be just one more 'look for entry point'
call in the function manager.

I'll be very happy to see newC replaced with this...


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: Re: AW: Please advise features in 7.1
Next
From: Thomas Lockhart
Date:
Subject: Database startup info