From: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> |
---|---|
To: | Geoff Winkless <pgsqladmin(at)geoff(dot)dj>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: late binding of shared libs for C functions |
Date: | 2018-06-12 12:41:08 |
Message-ID: | 88d65b95-6124-95e3-d538-5346601ce651@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 06/12/2018 06:48 AM, Geoff Winkless wrote:
> Hi All
>
> Is it possible to use CREATE FUNCTION to link a shared library that
> doesn't yet exist? I don't think it is, but I might be missing
> something.
>
> If not, would it be something that people would be open to a patch
> for? I'm thinking of e.g.
>
> CREATE [ OR REPLACE ] FUNCTION
> name ( [ [ argmode ] [ argname ] argtype [ { DEFAULT | = }
> default_expr ] [, ...] ] )
> [ RETURNS rettype
> | RETURNS TABLE ( column_name column_type [, ...] ) ]
> { LANGUAGE lang_name
> | TRANSFORM { FOR TYPE type_name } [, ... ]
> | WINDOW
> | IMMUTABLE | STABLE | VOLATILE | [ NOT ] LEAKPROOF
> | CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
> | [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER
> | PARALLEL { UNSAFE | RESTRICTED | SAFE }
> | COST execution_cost
> | ROWS result_rows
> | SET configuration_parameter { TO value | = value | FROM CURRENT }
> | AS 'definition'
> - | AS 'obj_file', 'link_symbol'
> + | AS 'obj_file', 'link_symbol' [UNBOUNDED]
> } ...
> [ WITH ( attribute [, ...] ) ]
>
>
> (I know UNBOUNDED isn't quite the word - BINDLATE would be better -
> but I figured I should try to use an existing reserved keyword...)
>
UNBOUNDED would be terrible. It does not mean the same thing as UNBOUND.
Perhaps something like NO CHECK would meet the case, i.e. we're not
checking the link at function creation time.
I haven't thought through the other implications yet.
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Gierth | 2018-06-12 12:46:55 | Re: late binding of shared libs for C functions |
Previous Message | Darafei Komяpa Praliaskouski | 2018-06-12 12:21:38 | Re: late binding of shared libs for C functions |