You don't need to use execute if you create your temp tables like this:
CREATE TEMP TABLE mytest
(
)WITHOUT OIDS ON COMMIT DELETE ROWS
Then use the follwoing function(author unknown) to see if the temp table
already exists:
CREATE or REPLACE FUNCTION public.iftableexists( varchar)
RETURNS pg_
Create your temp tables like this:
CREATE TEMP TABLE mytest
(
)WITHOUT OIDS ON COMMIT DELETE ROWS
PG holds onto the temp table for the duration of the connection, when the
connection ends all temp tables are dropped. This means you can simply reuse
the same tables for the duration of the conn
Hi,
currently when you execute a CREATE OR REPLACE FUNCTION there is virtually no
checking of the function body for variable type compatibility or if the SQL
statements are valid.
It's not a big deal for long time users of Postgres, but for users migrating
from systems such as MS SQL or Oracle
Bruce,
here is a example:
(there is a simple error in the function that does not get caught when running
the query in 8.0)
CREATE or REPLACE FUNCTION annual.get_ratio( float8, float8)
RETURNS pg_catalog.float8 AS
$BODY$
DECLARE
execptioncount_in alias for $1;
questioncount_in alias for $2;
ratio_
Bruce,
This function which has even more errors also raises no errors when run in the
query editor:
CREATE or replace function annual.get_ratio72( float8, float8)
RETURNS pg_catalog.float8 AS
$BODY$
DECLARE
execptioncount_in alias for $1;
questioncount_in alias for $2;
IF (execptioncount_in >