Template:Postgres function installation

From NEOSYS Dev Wiki
Revision as of 18:54, 31 March 2009 by Steve (talk | contribs) (New page: -- The latest version of this can be found in pgexodus.c CREATE OR REPLACE FUNCTION neo_call(bytea, bytea, bytea, bytea, bytea, int4, int4) RETURNS bytea AS 'pgexodus', 'neo_call' LANGUAG...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

-- The latest version of this can be found in pgexodus.c

CREATE OR REPLACE FUNCTION neo_call(bytea, bytea, bytea, bytea, bytea, int4, int4) RETURNS bytea AS 'pgexodus', 'neo_call' LANGUAGE C IMMUTABLE;

CREATE OR REPLACE FUNCTION neo_extract_bytea(bytea, int4, int4, int4) RETURNS bytea AS 'pgexodus', 'neo_extract_bytea' LANGUAGE C IMMUTABLE;

CREATE OR REPLACE FUNCTION neo_extract_text(bytea, int4, int4, int4) RETURNS text AS 'pgexodus', 'neo_extract_text' LANGUAGE C IMMUTABLE;

-- Remaining functions are STRICT therefore never get called with NULLS -- also return NULL if passed zero length strings

CREATE OR REPLACE FUNCTION neo_extract_text2(bytea, int4, int4, int4) RETURNS text AS 'pgexodus', 'neo_extract_text2' LANGUAGE C IMMUTABLE STRICT;

CREATE OR REPLACE FUNCTION neo_extract_date(bytea, int4, int4, int4) RETURNS date AS 'pgexodus', 'neo_extract_date' LANGUAGE C IMMUTABLE STRICT;

CREATE OR REPLACE FUNCTION neo_extract_time(bytea, int4, int4, int4) RETURNS time AS 'pgexodus', 'neo_extract_time' LANGUAGE C IMMUTABLE STRICT;

CREATE OR REPLACE FUNCTION neo_extract_datetime(bytea, int4, int4, int4) RETURNS timestamp AS 'pgexodus', 'neo_extract_datetime' LANGUAGE C IMMUTABLE STRICT;