Permalink
Browse files

Add "--with-greenplum" option to compile with greenplum instead of or…

…iginal postgresql. Fix one compilation problem (a datum getter should return with datum)
  • Loading branch information...
1 parent df2c4d3 commit bd188760beecd5c34479f2d26bb7bd9b644bb772 @tfoldi tfoldi committed Apr 29, 2010
Showing with 8 additions and 1 deletion.
  1. +5 −0 extconf.rb
  2. +2 −0 src/plplan.c
  3. +1 −1 src/plruby.h
View
@@ -97,6 +97,11 @@ def rule(target, clean = nil)
safe = 12
end
+if with_config("greenplum")
+ $CFLAGS += " -I" << File.join( include_dir, "postgresql", "internal" )
+ $CFLAGS += " -DWITH_GREENPLUM=1"
+end
+
if timeout = with_config("timeout")
timeout = Integer(timeout)
if timeout < 2
View
@@ -563,6 +563,8 @@ pl_plan_execp(argc, argv, obj)
#if PG_PL_VERSION == 74
#define PORTAL_ACTIVE(port) ((port)->portalActive)
+#elif WITH_GREENPLUM == 1
+#define PORTAL_ACTIVE(port) ((port)->portal_status == PORTAL_ACTIVE)
#elif PG_PL_VERSION > 74
#define PORTAL_ACTIVE(port) ((port)->status == PORTAL_ACTIVE)
#else
View
@@ -303,7 +303,7 @@ extern Datum plruby_dfc3 _((PGFunction, Datum, Datum, Datum));
extern VALUE plruby_classes, plruby_conversions;
extern Oid plruby_datum_oid _((VALUE, int *));
extern VALUE plruby_datum_set _((VALUE, Datum));
-extern VALUE plruby_datum_get _((VALUE, Oid *));
+extern Datum plruby_datum_get _((VALUE, Oid *));
extern VALUE plruby_define_void_class _((char *, char *));
#endif

0 comments on commit bd18876

Please sign in to comment.