Re: late binding of shared libs for C functions - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: late binding of shared libs for C functions
Date
Msg-id 88d65b95-6124-95e3-d538-5346601ce651@2ndQuadrant.com
Whole thread Raw
In response to late binding of shared libs for C functions  (Geoff Winkless <pgsqladmin@geoff.dj>)
Responses Re: late binding of shared libs for C functions
Re: late binding of shared libs for C functions
Re: late binding of shared libs for C functions
List 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



pgsql-hackers by date:

Previous
From: Darafei "Komяpa" Praliaskouski
Date:
Subject: Re: late binding of shared libs for C functions
Next
From: Andrew Gierth
Date:
Subject: Re: late binding of shared libs for C functions