summaryrefslogtreecommitdiff
path: root/src/backend/commands/define.c
AgeCommit message (Collapse)Author
2000-05-12This is the second time I've answered this exact same problem in twoBruce Momjian
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
2000-04-13Fixed CREATE TYPE to recognize changed parsenodesJan Wieck
Jan
2000-04-12Ye-old pgindent run. Same 4-space tabs.Bruce Momjian
2000-04-07Add transcendental math functions (sine, cosine, etc)Thomas G. Lockhart
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.
2000-01-26Add:Bruce Momjian
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
1999-11-22Add system indexes to match all caches.Bruce Momjian
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.
1999-10-02Allow CREATE FUNCTION's WITH clause to be used for all language types,Tom Lane
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).
1999-09-28 I have been working with user defined types and user defined cBruce Momjian
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
1999-07-17 Move some system includes into c.h, and remove duplicates.Bruce Momjian
1999-07-16Final cleanup.Bruce Momjian
1999-07-16Update #include cleanupsBruce Momjian
1999-07-15Change #include's to use <> and "" as appropriate.Bruce Momjian
1999-07-15Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian
1999-05-25pgindent run over code.Bruce Momjian
1999-04-09Fix CREATE OPERATOR ... LANGUAGE 'internal', which I broke whileTom Lane
making prosrc instead of proname be the link to the actual internal function.
1999-02-13Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian
1998-09-01Renaming cleanup, no pgindent yet.Bruce Momjian
1998-06-15Remove un-needed braces around single statements.Bruce Momjian
1998-02-26pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian
1998-02-25From: Jan Wieck <jwieck@debis.com>Marc G. Fournier
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.
1998-02-13From: Jan Wieck <jwieck@debis.com>Marc G. Fournier
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.
1998-01-05Change some ABORTS to ERROR. Add line number when COPY Failure.Bruce Momjian
1998-01-05Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian
1997-12-05Fix tolower loops to go in proper direction for cache.Bruce Momjian
1997-11-26Re-order args for TypeCreate() to be clearer.Bruce Momjian
1997-10-28Now we are able to CREATE PROCEDURAL LANGUAGE (Thanks, Jan).Vadim B. Mikheev
1997-09-08Used modified version of indent that understands over 100 typedefs.Bruce Momjian
1997-09-08Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian
indenting. Also static variable indenting.
1997-09-07Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian
1997-08-12Remove more (void) and fix -Wall warnings.Bruce Momjian
1997-08-03Cleanup for NAMEDATALEN use.Bruce Momjian
1996-11-30Change end-of-line comma to semicolon.Bruce Momjian
1996-11-10All external function definitions now have prototypes that are checked.Bruce Momjian
1996-11-08More compile cleanupsBruce Momjian
1996-11-08Fix perbyte_cpu thingBryan Henderson
1996-11-08Compile and warning cleanupBruce Momjian
1996-11-06Clean it up so that it compilesMarc G. Fournier
1996-11-03Another first pass at cleaning up the #includesMarc G. Fournier
1996-11-02Allow only superuser to do backend copy.Bryan Henderson
1996-10-31Require superuser privilege to create C function.Bryan Henderson
1996-10-23Major code cleanups from D'arcy (-Wall -Werror)Marc G. Fournier
1996-07-09Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier