diff --git a/cmake/FindPostgreSQL.cmake b/cmake/FindPostgreSQL.cmake index 33702cd67e76fb4efb1f411811fc24df9c6d45a2..73800fb07475ee53f9e7a5215fed33a6a6aa9c5c 100644 --- a/cmake/FindPostgreSQL.cmake +++ b/cmake/FindPostgreSQL.cmake @@ -101,21 +101,6 @@ find_path(PostgreSQL_INCLUDE_DIR DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}" ) -find_path(PostgreSQL_TYPE_INCLUDE_DIR - NAMES catalog/pg_type.h - PATHS - # Look in other places. - ${PostgreSQL_ROOT_DIRECTORIES} - PATH_SUFFIXES - server - postgresql - pgsql/server - postgresql/server - include/server - # Help the user find it if we cannot. - DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}" -) - # The PostgreSQL library. set (PostgreSQL_LIBRARY_TO_FIND pq) # Setting some more prefixes for the library @@ -146,14 +131,14 @@ endif() # Did we find anything? include(FindPackageHandleStandardArgs) find_package_handle_standard_args(PostgreSQL - REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR + REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR VERSION_VAR PostgreSQL_VERSION_STRING) set( PostgreSQL_FOUND ${POSTGRESQL_FOUND}) # Now try to get the include and library path. if(PostgreSQL_FOUND) - set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ${PostgreSQL_TYPE_INCLUDE_DIR} ) + set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ) set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} ) set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND}) @@ -162,4 +147,4 @@ if(PostgreSQL_FOUND) #message("Final PostgreSQL libraries: ${PostgreSQL_LIBRARIES}") endif() -mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR PostgreSQL_LIBRARY ) +mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_LIBRARY ) diff --git a/debian/control b/debian/control index c4bb1f8245162377c75decb4287dd3038cfd34a7..0705c96f274f79a22425a8394304f7fcc9c9c94b 100644 --- a/debian/control +++ b/debian/control @@ -10,8 +10,7 @@ Build-Depends: cdbs, debhelper (>= 8), libncurses5-dev, libiberty-dev | binutils-dev, libmysqlclient-dev, - libpq-dev, - postgresql-server-dev-all + libpq-dev Section: database Standards-Version: 3.9.5 Homepage: http://tarantool.org/ diff --git a/src/module/pg/pg.cc b/src/module/pg/pg.cc index 58d4adbd9a3d7fa3dbb0b742ae2f21d0698b45d5..e11817dccf58138c9879596ef14c749c58544d7c 100644 --- a/src/module/pg/pg.cc +++ b/src/module/pg/pg.cc @@ -28,12 +28,18 @@ */ extern "C" { - #include <postgres.h> #include <libpq-fe.h> - #include <catalog/pg_type.h> #undef PACKAGE_VERSION } +/* PostgreSQL types (see catalog/pg_type.h) */ +#define INT2OID 21 +#define INT4OID 23 +#define INT8OID 20 +#define NUMERICOID 1700 +#define BOOLOID 16 +#define TEXTOID 25 + #include <stddef.h> extern "C" {