C coder

broken image
broken image

If the name is an absolute path, the given file is loaded. Support for that calling convention is indicated by writing a PG_FUNCTION_INFO_V1() macro call for the function, as illustrated below. (Hence, the standard internal function library is a rich source of coding examples for user-defined C functions.)Ĭurrently only one calling convention is used for C functions ( “ version 1”). The dynamic loading feature is what distinguishes “ C language” functions from “ internal” functions - the actual coding conventions are essentially the same for both.

broken image

Such functions are compiled into dynamically loadable objects (also called shared libraries) and are loaded by the server on demand. User-defined functions can be written in C (or a language that can be made compatible with C, such as C++). Polymorphic Arguments and Return Types 38.10.10. Returning Rows (Composite Types) 38.10.8. Compiling and Linking Dynamically-Loaded Functions 38.10.6. Base Types in C-Language Functions 38.10.3.

broken image