postgresql/src/backend/commands
Bruce Momjian a28f117790 This is the second time I've answered this exact same problem in two
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-05-12 18:51:59 +00:00
..
_deadcode Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
async.c Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
cluster.c Squash some more CLUSTER bugs. Never has worked on multiple-column 2000-05-12 16:10:09 +00:00
command.c Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
comment.c Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
copy.c Allow COPY WITH OIDS to system OID values --- rely on unique indexes to 2000-04-16 04:27:52 +00:00
creatinh.c Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
dbcommands.c Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
define.c This is the second time I've answered this exact same problem in two 2000-05-12 18:51:59 +00:00
explain.c Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
indexcmds.c change reindex ERROR/NOTICE message 2000-04-25 10:38:38 +00:00
Makefile Removed MBFLAGS from makefiles since it's now done in include/config.h. 2000-01-19 02:59:03 +00:00
proclang.c Make number of args to a function configurable. 2000-01-10 17:14:46 +00:00
remove.c Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
rename.c Fix CLUSTER ... or at least undo the bit-rot it's suffered since 6.5. 2000-05-11 03:54:18 +00:00
sequence.c Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
trigger.c Show failing OID in 'cache lookup failed' messages. 2000-04-16 04:25:42 +00:00
user.c Don't leak a file descriptor when updating pg_pwd file. Also, check for 2000-05-04 20:06:07 +00:00
vacuum.c Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
variable.c Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
view.c Carry column aliases from the parser frontend. Enables queries like 2000-02-15 03:38:29 +00:00