Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support EXTENSION.

Since FDW appears from 9.1 as well, we don't bother multi-version
support for this module.
  • Loading branch information...
commit 58a2fa28c4f98e0a038826f54b6f41b09e0dd40f 1 parent 12bda65
@umitanuki authored
View
4 Makefile
@@ -3,9 +3,9 @@
LIBJSON = libjson-0.8
MODULE_big = twitter_fdw
OBJS = twitter_fdw.o $(LIBJSON)/json.o
+EXTENSION = twitter_fdw
+DATA = twitter_fdw--1.0.sql
-DATA_built = twitter_fdw.sql
-DATA = uninstall_twitter_fdw.sql
REGRESS = twitter_fdw
SHLIB_LINK = -lcurl
View
4 expected/twitter_fdw.out
@@ -1,6 +1,4 @@
-SET client_min_messages = warning;
-\set ECHO none
-RESET client_min_messages;
+CREATE EXTENSION twitter_fdw;
SELECT count(*) FROM twitter;
count
-------
View
6 sql/twitter_fdw.sql
@@ -1,8 +1,4 @@
-SET client_min_messages = warning;
-\set ECHO none
-\i twitter_fdw.sql
-\set ECHO all
-RESET client_min_messages;
+CREATE EXTENSION twitter_fdw;
SELECT count(*) FROM twitter;
View
9 twitter_fdw.sql.in → twitter_fdw--1.0.sql
@@ -1,17 +1,14 @@
-/* contrib/twitter_fdw/twitter_fdw.sql.in */
-
--- Adjust this setting to control where the objects get created.
-SET search_path = public;
+/* contrib/twitter_fdw/twitter_fdw--1.0.sql */
-- create wrapper with validator and handler
CREATE OR REPLACE FUNCTION twitter_fdw_validator (text[], oid)
RETURNS bool
-AS 'MODULE_PATHNAME','twitter_fdw_validator'
+AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE OR REPLACE FUNCTION twitter_fdw_handler ()
RETURNS fdw_handler
-AS 'MODULE_PATHNAME','twitter_fdw_handler'
+AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FOREIGN DATA WRAPPER twitter_fdw
Please sign in to comment.
Something went wrong with that request. Please try again.