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 484295e58bb4e585dd403526ed242ad569d3315b..ad10860a0fda09bf570fad61b1edc4331bf93757 100644 --- a/debian/control +++ b/debian/control @@ -9,8 +9,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 27f71bbd9f5bcfac573c84bae517eabb88b371ce..438d236767e97d345420135531cff4dbbe963994 100644 --- a/src/module/pg/pg.cc +++ b/src/module/pg/pg.cc @@ -30,10 +30,17 @@ 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" {