aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/define.c
Commit message (Collapse)AuthorAge
...
* This is the second time I've answered this exact same problem in twoBruce Momjian2000-05-12
| | | | | | | | | | | | | | | | | | | | | days. It seems to be a FAQ, and I think I know why. When creating a 'c' language function, CREATE FUNCTION is fed the shared object filename, and seems to succeed. Only when trying to use the function is an error thrown, by which time the coder thinks something's wrong with executing the code, not with loading it. I think I once saw it proposed to load shared objects at function creation time, but that idea was shot down on the grounds of resident memory bloat, ISTR. Here's a patch for a compromise: all it does is stat() the file, just like the loader code does, so that the errors caused by non existent files, and no directory 'x' permissions (the most common ones, it seems), get caught while the developer is still thinking about code loading. It doesn't catch all errors (like the code not being readable by the postgres user) but seems to catch the most common, without actually opening the file. What do you think? Ross
* Fixed CREATE TYPE to recognize changed parsenodesJan Wieck2000-04-13
| | | | Jan
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Add transcendental math functions (sine, cosine, etc)Thomas G. Lockhart2000-04-07
| | | | | | | | | | | | | | | | Add a random number generator and seed setter (random(), SET SEED) Fix up the interval*float8 math to carry partial months into the time field. Add float8*interval so we have symmetry in the available math. Fix the parser and define.c to accept SQL92 types as field arguments. Fix the parser to accept SQL92 types for CREATE TYPE, etc. This is necessary to allow... Bit/varbit support in contrib/bit cleaned up to compile and load cleanly. Still needs some work before final release. Implement the "SOME" keyword as a synonym for "ANY" per SQL92. Implement ascii(text), ichar(int4), repeat(text,int4) to help support the ODBC driver. Enable the TRUNCATE() function mapping in the ODBC driver.
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Add system indexes to match all caches.Bruce Momjian1999-11-22
| | | | | | | Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
* Allow CREATE FUNCTION's WITH clause to be used for all language types,Tom Lane1999-10-02
| | | | | | | not just C, so that ISCACHABLE attribute can be specified for user-defined functions. Get rid of ParamString node type, which wasn't actually being generated by gram.y anymore, even though define.c thought that was what it was getting. Clean up minor bug in dfmgr.c (premature heap_close).
* I have been working with user defined types and user defined cBruce Momjian1999-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions. One problem that I have encountered with the function manager is that it does not allow the user to define type conversion functions that convert between user types. For instance if mytype1, mytype2, and mytype3 are three Postgresql user types, and if I wish to define Postgresql conversion functions like I run into problems, because the Postgresql dynamic loader would look for a single link symbol, mytype3, for both pieces of object code. If I just change the name of one of the Postgresql functions (to make the symbols distinct), the automatic type conversion that Postgresql uses, for example, when matching operators to arguments no longer finds the type conversion function. The solution that I propose, and have implemented in the attatched patch extends the CREATE FUNCTION syntax as follows. In the first case above I use the link symbol mytype2_to_mytype3 for the link object that implements the first conversion function, and define the Postgresql operator with the following syntax The patch includes changes to the parser to include the altered syntax, changes to the ProcedureStmt node in nodes/parsenodes.h, changes to commands/define.c to handle the extra information in the AS clause, and changes to utils/fmgr/dfmgr.c that alter the way that the dynamic loader figures out what link symbol to use. I store the string for the link symbol in the prosrc text attribute of the pg_proc table which is currently unused in rows that reference dynamically loaded functions. Bernie Frankpitt
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Final cleanup.Bruce Momjian1999-07-16
|
* Update #include cleanupsBruce Momjian1999-07-16
|
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-15
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-15
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* Fix CREATE OPERATOR ... LANGUAGE 'internal', which I broke whileTom Lane1999-04-09
| | | | making prosrc instead of proname be the link to the actual internal function.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-13
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-01
|
* Remove un-needed braces around single statements.Bruce Momjian1998-06-15
|
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-26
|
* From: Jan Wieck <jwieck@debis.com>Marc G. Fournier1998-02-25
| | | | | | | | | | seems that my last post didn't make it through. That's good since the diff itself didn't covered the renaming of pg_user.h to pg_shadow.h and it's new content. Here it's again. The complete regression test passwd with only some float diffs. createuser and destroyuser work. pg_shadow cannot be read by ordinary user.
* From: Jan Wieck <jwieck@debis.com>Marc G. Fournier1998-02-13
| | | | | | | | | Someone changed the parser to build a TypeName node on CREATE FUNCTION in any case. As a side effect, ALL! functions created got the proretset attribute to true. Thus for a SELECT the parser wrapped an Iter node around the Expr and since singleton functions set isDone the Iter returns no tuple up.
* Change some ABORTS to ERROR. Add line number when COPY Failure.Bruce Momjian1998-01-05
|
* Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian1998-01-05
|
* Fix tolower loops to go in proper direction for cache.Bruce Momjian1997-12-05
|
* Re-order args for TypeCreate() to be clearer.Bruce Momjian1997-11-26
|
* Now we are able to CREATE PROCEDURAL LANGUAGE (Thanks, Jan).Vadim B. Mikheev1997-10-28
|
* Used modified version of indent that understands over 100 typedefs.Bruce Momjian1997-09-08
|
* Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian1997-09-08
| | | | indenting. Also static variable indenting.
* Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian1997-09-07
|
* Remove more (void) and fix -Wall warnings.Bruce Momjian1997-08-12
|
* Cleanup for NAMEDATALEN use.Bruce Momjian1997-08-03
|
* Change end-of-line comma to semicolon.Bruce Momjian1996-11-30
|
* All external function definitions now have prototypes that are checked.Bruce Momjian1996-11-10
|
* More compile cleanupsBruce Momjian1996-11-08
|
* Fix perbyte_cpu thingBryan Henderson1996-11-08
|
* Compile and warning cleanupBruce Momjian1996-11-08
|
* Clean it up so that it compilesMarc G. Fournier1996-11-06
|
* Another first pass at cleaning up the #includesMarc G. Fournier1996-11-03
|
* Allow only superuser to do backend copy.Bryan Henderson1996-11-02
|
* Require superuser privilege to create C function.Bryan Henderson1996-10-31
|
* Major code cleanups from D'arcy (-Wall -Werror)Marc G. Fournier1996-10-23
|
* Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier1996-07-09