forked from greenplum-db/pxf-archive
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpxf--2.1.sql
32 lines (25 loc) · 1.09 KB
/
pxf--2.1.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
------------------------------------------------------------------
-- PXF Protocol/Formatters
------------------------------------------------------------------
CREATE OR REPLACE FUNCTION pg_catalog.pxf_write() RETURNS integer
AS 'MODULE_PATHNAME', 'pxfprotocol_export'
LANGUAGE C STABLE;
CREATE OR REPLACE FUNCTION pg_catalog.pxf_read() RETURNS integer
AS 'MODULE_PATHNAME', 'pxfprotocol_import'
LANGUAGE C STABLE;
CREATE OR REPLACE FUNCTION pg_catalog.pxf_validate() RETURNS void
AS 'MODULE_PATHNAME', 'pxfprotocol_validate_urls'
LANGUAGE C STABLE;
CREATE OR REPLACE FUNCTION pg_catalog.pxfwritable_import() RETURNS record
AS 'MODULE_PATHNAME', 'gpdbwritableformatter_import'
LANGUAGE C STABLE;
CREATE OR REPLACE FUNCTION pg_catalog.pxfwritable_export(record) RETURNS bytea
AS 'MODULE_PATHNAME', 'gpdbwritableformatter_export'
LANGUAGE C STABLE;
CREATE OR REPLACE FUNCTION pg_catalog.pxfdelimited_import() RETURNS record
AS 'MODULE_PATHNAME', 'pxfdelimited_import'
LANGUAGE C STABLE;
CREATE TRUSTED PROTOCOL pxf (
writefunc = pxf_write,
readfunc = pxf_read,
validatorfunc = pxf_validate);