> Date: 04 Dec 2002 15:53:07 -0500
> From: Robert Treat <xzilla@users.sourceforge.net>
>
> Our goal: To have a multiuser-safe function that checks for the existence of a table. If the table
> exists, it should return the name of the table. If it does not exist, it will call another
> function that creates the table and then it should return the name of the table after it's been created.
>
The most basic rule in database design is that applications must not change the
database schema but only the database contents. According to this rule a function
that changes the schema and is called by several application users parallel is a
bad idea.
It is generally a wrong assumption that DDL statements can be run "multi user safe"
at all: eg. in Oracle DDL statements are not run in transactions (sorry, no rollback
for a "drop table") and are not allowed in stored procedures.
So what is the reasoning behind your odd function?
It is most probably a design flaw.
Christoph Dalitz