Permalink
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...
1 parent 12bda65 commit 58a2fa28c4f98e0a038826f54b6f41b09e0dd40f @umitanuki committed May 13, 2011
Showing with 7 additions and 16 deletions.
  1. +2 −2 Makefile
  2. +1 −3 expected/twitter_fdw.out
  3. +1 −5 sql/twitter_fdw.sql
  4. +3 −6 twitter_fdw.sql.in → twitter_fdw--1.0.sql
View
@@ -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
@@ -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
@@ -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;
@@ -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

0 comments on commit 58a2fa2

Please sign in to comment.