Permalink
Browse files

- Adjust for the fact that bytea.h did not exist before PostgreSQL 9.0

  • Loading branch information...
1 parent 85e0638 commit a0cd74f0b15c2e2f3a2d0337db8ac41349858a77 jconway committed Feb 1, 2010
Showing with 6 additions and 0 deletions.
  1. +4 −0 pg_backend_support.c
  2. +2 −0 plr.h
View
@@ -224,6 +224,7 @@ get_lib_pathstr(Oid funcid)
tmp = SysCacheGetAttr(PROCOID, procedureTuple, Anum_pg_proc_probin, &isnull);
raw_path = DatumGetCString(DirectFunctionCall1(byteaout, tmp));
+#if PG_VERSION_NUM >= 80500
/* Recognize hex input */
if (raw_path[0] == '\\' && raw_path[1] == 'x')
{
@@ -239,6 +240,9 @@ get_lib_pathstr(Oid funcid)
}
else
cooked_path = expand_dynamic_library_name(raw_path);
+#else
+ cooked_path = expand_dynamic_library_name(raw_path);
+#endif
if (!cooked_path)
cooked_path = pstrdup(raw_path);
View
2 plr.h
@@ -54,7 +54,9 @@
#include "tcop/tcopprot.h"
#include "utils/array.h"
#include "utils/builtins.h"
+#if PG_VERSION_NUM >= 80500
#include "utils/bytea.h"
+#endif
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/syscache.h"

0 comments on commit a0cd74f

Please sign in to comment.