Re: [HACKERS] Patch for user-defined C-language functions
От | Bernard Frankpitt |
---|---|
Тема | Re: [HACKERS] Patch for user-defined C-language functions |
Дата | |
Msg-id | 37DE6E02.32E4B3AD@pop.dn.net обсуждение исходный текст |
Ответ на | Re: [HACKERS] Patch for user-defined C-language functions (Andreas Zeugswetter <andreas.zeugswetter@telecom.at>) |
Список | pgsql-hackers |
Andreas Zeugswetter wrote: > > But I think the intuitive Syntax in SQL would use (): > > CREATE FUNCTION mytype3 ( mytype2 ) > RETURNS mytype3 > AS 'mytypes.so(mytype2_to_mytype3)' > LANGUAGE 'C' > > Syntax: > AS <link_file>[(symbol_name)] > > This is also how Illustra and now Informix does it. > (Instead of AS they say EXTERNAL NAME) > The syntax AS <link_file>[(symbol_name)] would be easy to implement provided I could write your example as CREATE FUNCTION mytype3 ( mytype2 ) RETURNS mytype3 AS 'mytypes.so'('mytype2_to_mytype3') LANGUAGE 'C' That way link_file and symbol_name both look like string tokens to the parser. If it is implemented the way you write in the example with 'mytypes.so(mytype2_to_mytype3)' Then the parser sees the arguement of the AS clause as a single string token which would have to be parsed separately. Also, there is some ambiguity in this form as to whether the string 'mytypes.so(mytype2_to_mytype3)' is a single filename, or a filename and a link symbol Bernie
В списке pgsql-hackers по дате отправления: