summaryrefslogtreecommitdiff
path: root/src/include/fmgr.h
Commit message (Collapse)AuthorAgeFilesLines
* Modify all callers of datatype input and receive functions so that if theseTom Lane2006-04-041-1/+17
| | | | | | | | | | | | | | | functions are not strict, they will be called (passing a NULL first parameter) during any attempt to input a NULL value of their datatype. Currently, all our input functions are strict and so this commit does not change any behavior. However, this will make it possible to build domain input functions that centralize checking of domain constraints, thereby closing numerous holes in our domain support, as per previous discussion. While at it, I took the opportunity to introduce convenience functions InputFunctionCall, OutputFunctionCall, etc to use in code that calls I/O functions. This eliminates a lot of grotty-looking casts, but the main motivation is to make it easier to grep for these places if we ever need to touch them again.
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-051-2/+2
|
* Improve STRINGS_H macro test for MSVC extensions.Bruce Momjian2006-03-051-4/+7
| | | | Add DLLIMPORT for V1 headers, in case Win32 don't export all symbols.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-151-12/+7
|
* Avoid bare 'struct Node;' declaration --- provokes annoying warningsTom Lane2005-06-091-6/+6
| | | | on some compilers.
* First phase of OUT-parameters project. We can now define and use SQLTom Lane2005-03-311-1/+5
| | | | | functions with OUT parameters. The various PLs still need work, as does pg_dump. Rudimentary docs and regression tests included.
* Use InitFunctionCallInfoData() macro instead of MemSet in performanceTom Lane2005-03-221-1/+17
| | | | critical places in execQual. By Atsushi Ogawa; some minor cleanup by moi.
* Tag appropriate files for rc3PostgreSQL Daemon2004-12-311-2/+2
| | | | | | | | Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
* Update copyright to 2004.Bruce Momjian2004-08-291-2/+2
|
* Replace TupleTableSlot convention for whole-row variables and functionTom Lane2004-04-011-1/+6
| | | | | | | | results with tuples as ordinary varlena Datums. This commit does not in itself do much for us, except eliminate the horrid memory leak associated with evaluation of whole-row variables. However, it lays the groundwork for allowing composite types as table columns, and perhaps some other useful features as well. Per my proposal of a few days ago.
* Add a hash table to cache lookups of 'C'-language functions (that is,Tom Lane2004-01-191-1/+2
| | | | | | dynamically loaded C functions). Some limited testing suggests that this puts the lookup speed for external functions just about on par with built-in functions. Per discussion with Eric Ridge.
* make sure the $Id tags are converted to $PostgreSQL as well ...PostgreSQL Daemon2003-11-291-1/+1
|
* Update copyrights to 2003.Bruce Momjian2003-08-041-2/+2
|
* SQL functions can have arguments and results declared ANYARRAY orTom Lane2003-07-011-3/+3
| | | | | | | | ANYELEMENT. The effect is to postpone typechecking of the function body until runtime. Documentation is still lacking. Original patch by Joe Conway, modified to postpone type checking by Tom Lane.
* Back out array mega-patch.Bruce Momjian2003-06-251-6/+5
| | | | Joe Conway
* Array mega-patch.Bruce Momjian2003-06-241-5/+6
| | | | Joe Conway
* First phase of work on array improvements. ARRAY[x,y,z] constructorTom Lane2003-04-081-1/+4
| | | | | | | expressions, ARRAY(sub-SELECT) expressions, some array functions. Polymorphic functions using ANYARRAY/ANYELEMENT argument and return types. Some regression tests in place, documentation is lacking. Joe Conway, with some kibitzing from Tom Lane.
* Add dummy variable declaration to PG_FUNCTION_INFO_V1() to preventTom Lane2002-10-251-2/+3
| | | | | | 'empty declaration' warnings from compilers that care about such things. Per discussion back before 7.2 release; we didn't do it then because we'd already missed all the beta cycle ...
* The small context diff below corrects what seems to be an oversight inBruce Momjian2002-09-121-1/+6
| | | | | | | | | | | | | | | | | | fmgr.h - it's discouraged to access fcinfo directly but there is no macro to get the number of arguments passed to the function. Checking the number of arguments is often useful when you have a function which can be called like: func('arg'); func(null); func(); all mapping to the same C function. the macro has a function-like appearance to match the other PG_* macros. Lee Kindness.
* pgindent run.Bruce Momjian2002-09-041-7/+7
|
* PL/pgSQL functions can return sets. Neil Conway's patch, modified soTom Lane2002-08-301-3/+2
| | | | | that the functionality is available to anyone via ReturnSetInfo, rather than hard-wiring it to PL/pgSQL.
* Update copyright to 2002.Bruce Momjian2002-06-201-2/+2
|
* Implement types regprocedure, regoper, regoperator, regclass, regtypeTom Lane2002-04-251-4/+1
| | | | | | | per pghackers discussion. Add some more typsanity tests, and clean up some problems exposed thereby (broken or missing array types for some built-in types). Also, clean up loose ends from unknownin/out patch.
* Here's a patch to add unknownin/unknownout support. I also poked aroundBruce Momjian2002-04-241-1/+4
| | | | | | | | | | looking for places that assume UNKNOWN == TEXT. One of those was the "SET" type in pg_type.h, which was using textin/textout. This one I took care of in this patch. The other suspicious place was in string_to_dataum (which is defined in both selfuncs.c and indxpath.c). I wasn't too sure about those, so I left them be. Joe Conway
* I attach a version of my toast-slicing patch, against current CVSBruce Momjian2002-03-051-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (current as of a few hours ago.) This patch: 1. Adds PG_GETARG_xxx_P_SLICE() macros and associated support routines. 2. Adds routines in src/backend/access/tuptoaster.c for fetching only necessary chunks of a toasted value. (Modelled on latest changes to assume chunks are returned in order). 3. Amends text_substr and bytea_substr to use new methods. It now handles multibyte cases -and should still lead to a performance improvement in the multibyte case where the substring is near the beginning of the string. 4. Added new command: ALTER TABLE tabname ALTER COLUMN colname SET STORAGE {PLAIN | EXTERNAL | EXTENDED | MAIN} to parser and documented in alter-table.sgml. (NB I used ColId as the item type for the storage mode string, rather than a new production - I hope this makes sense!). All this does is sets attstorage for the specified column. 4. AlterTableAlterColumnStatistics is now AlterTableAlterColumnFlags and handles both statistics and storage (it uses the subtype code to distinguish). The previous version of my patch also re-arranged other code in backend/commands/command.c but I have dropped that from this patch.(I plan to return to it separately). 5. Documented new macros (and also the PG_GETARG_xxx_P_COPY macros) in xfunc.sgml. ref/alter_table.sgml also contains documentation for ALTER COLUMN SET STORAGE. John Gray
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-051-2/+2
| | | | initdb/regression tests pass.
* Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian2001-10-281-1/+2
| | | | spacing. Also adds space for one-line comments.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-251-5/+4
| | | | tests pass.
* Rearrange fmgr.c and relcache so that it's possible to keep FmgrInfoTom Lane2001-10-061-5/+21
| | | | | | | | | lookup info in the relcache for index access method support functions. This makes a huge difference for dynamically loaded support functions, and should save a few cycles even for built-in ones. Also tweak dfmgr.c so that load_external_function is called only once, not twice, when doing fmgr_info for a dynamically loaded function. All per performance gripe from Teodor Sigaev, 5-Oct-01.
* Add dynamic_library_path parameter and automatic appending of sharedPeter Eisentraut2001-05-171-1/+2
| | | | library extension.
* pgindent run. Make it all clean.Bruce Momjian2001-03-221-104/+111
|
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-241-2/+2
|
* Revise handling of oldstyle/newstyle functions per recent discussionsTom Lane2000-11-201-4/+42
| | | | | | | | | in pghackers list. Support for oldstyle internal functions is gone (no longer needed, since conversion is complete) and pg_language entry 'internal' now implies newstyle call convention. pg_language entry 'newC' is gone; both old and newstyle dynamically loaded C functions are now called language 'C'. A newstyle function must be identified by an associated info routine. See src/backend/utils/fmgr/README.
* SQL-language functions are now callable in ordinary fmgr contexts ...Tom Lane2000-08-241-1/+3
| | | | | | for example, an SQL function can be used in a functional index. (I make no promises about speed, but it'll work ;-).) Clean up and simplify handling of functions returning sets.
* bpchar, varchar, bytea, numeric are toastable --- if you initdb, whichTom Lane2000-07-291-1/+2
| | | | | | I did not force. I marked numeric as compressable-but-not-move-off-able, partly to test that storage mode and partly because I've got doubts that numerics are large enough to need external storage.
* First stage of reclaiming memory in executor by resetting short-termTom Lane2000-07-121-1/+16
| | | | | | memory contexts. Currently, only leaks in expressions executed as quals or projections are handled. Clean up some old dead cruft in executor while at it --- unused fields in state nodes, that sort of thing.
* Functions on 'text' type updated to new fmgr style. 'text' isTom Lane2000-07-061-21/+39
| | | | now TOAST-able.
* I had overlooked the fact that some fmgr-callable functions return voidTom Lane2000-06-141-1/+4
| | | | | | --- ie, they're only called for side-effects. Add a PG_RETURN_VOID() macro and use it where appropriate. This probably doesn't change the machine code by a single bit ... it's just for documentation.
* Another batch of fmgr updates. I think I have gotten all old-styleTom Lane2000-06-131-25/+40
| | | | | functions that take pass-by-value datatypes. Should be ready for port testing ...
* Latest round of fmgr updates. All functions with bool,char, or int2Tom Lane2000-06-051-46/+19
| | | | | | | inputs have been converted to newstyle. This should go a long way towards fixing our portability problems with platforms where char and short parameters are passed differently from int-width parameters. Still more to do for the Alpha port however.
* Third round of fmgr updates: eliminate calls using fmgr() andTom Lane2000-05-301-10/+5
| | | | | fmgr_faddr() in favor of new-style calls. Lots of cleanup of sloppy casts to use XXXGetDatum and DatumGetXXX ...
* Second round of fmgr changes: triggers are now invoked in new style,Tom Lane2000-05-291-1/+3
| | | | CurrentTriggerData is history.
* First round of changes for new fmgr interface. fmgr itself and theTom Lane2000-05-281-0/+301
key call sites are changed, but most called functions are still oldstyle. An exception is that the PL managers are updated (so, for example, NULL handling now behaves as expected in plperl and plpgsql functions). NOTE initdb is forced due to added column in pg_proc.