sync odbc to opengauss
This commit is contained in:
74
windows/build/odbc.bat
Normal file
74
windows/build/odbc.bat
Normal file
@ -0,0 +1,74 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set WD=%__CD__%
|
||||
set LIB_SECURITY_DIR=%WD%\..\..\..\third_party\platform\Huawei_Secure_C\Huawei_Secure_C_V100R001C01SPC010B002
|
||||
set LIB_GAUSSDB_DIR=%WD%\..\..\..\server
|
||||
set LIB_ODBC_DIR=%WD%\..\..
|
||||
|
||||
set MINGW_DIR=C:\buildtools\mingw-8.1.0\msys32\mingw32
|
||||
set CMAKE_DIR=C:\buildtools\cmake
|
||||
set OPENSSL_DIR=C:\buildtools\OpenSSL-Win32
|
||||
|
||||
|
||||
REM Build libsecurec.lib
|
||||
cp win32/libpq/CMakeLists-huawei-securec.txt %LIB_SECURITY_DIR%/CMakeLists.txt
|
||||
cd %LIB_SECURITY_DIR%
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DMINGW_DIR="%MINGW_DIR%" -D"CMAKE_MAKE_PROGRAM:PATH=%MINGW_DIR%/bin/make.exe" -G "MinGW Makefiles" ..
|
||||
make
|
||||
cd %WD%
|
||||
|
||||
REM Build libpq.lib
|
||||
rm -rf %LIB_GAUSSDB_DIR%/libpq-win32
|
||||
cp -r win32/libpq %LIB_GAUSSDB_DIR%/libpq-win32
|
||||
cd %LIB_GAUSSDB_DIR%/libpq-win32
|
||||
cp -r %LIB_SECURITY_DIR%/output ./lib
|
||||
bash -l %LIB_GAUSSDB_DIR%/libpq-win32/project.sh
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DMINGW_DIR="%MINGW_DIR%" -DOPENSSL_DIR="%OPENSSL_DIR%" -D"CMAKE_MAKE_PROGRAM:PATH=%MINGW_DIR%/bin/make.exe" -G "MinGW Makefiles" ..
|
||||
make
|
||||
cd %WD%
|
||||
|
||||
REM Build psqlodbc35w.lib
|
||||
cd %LIB_ODBC_DIR%
|
||||
rm -rf libpq
|
||||
cp -r %LIB_GAUSSDB_DIR%/libpq-win32/libpq-export ./libpq
|
||||
cp -r %LIB_GAUSSDB_DIR%/libpq-win32/lib/* ./libpq/lib
|
||||
cp -r %LIB_GAUSSDB_DIR%/libpq-win32/output/libpq.lib ./libpq/lib
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DMINGW_DIR="%MINGW_DIR%" -DOPENSSL_DIR="%OPENSSL_DIR%" -D"CMAKE_MAKE_PROGRAM:PATH=%MINGW_DIR%/bin/make.exe" -G "MinGW Makefiles" ..
|
||||
make
|
||||
cd %WD%
|
||||
|
||||
REM Build psqlodbc.exe
|
||||
cd psqlodbc-installer
|
||||
rm -rf win32_dll
|
||||
mkdir win32_dll
|
||||
cp %LIB_ODBC_DIR%/output/psqlodbc35w.dll ./win32_dll
|
||||
cp "%OPENSSL_DIR%"/libssl-1_1.dll ./win32_dll
|
||||
cp "%OPENSSL_DIR%"/libcrypto-1_1.dll ./win32_dll
|
||||
makensis odbc-installer.nsi
|
||||
|
||||
cd %WD%
|
||||
rm -rf odbc_output
|
||||
mkdir odbc_output
|
||||
cp psqlodbc-installer/psqlodbc.exe odbc_output
|
||||
rm -rf psqlodbc-installer/psqlodbc.exe
|
||||
|
||||
|
||||
cd odbc_output
|
||||
%p7zip%\7z.exe a GaussDB-Kernel-V500R002C00-Windows-Odbc-X86.tar *
|
||||
%p7zip%\7z.exe a -tgzip GaussDB-Kernel-V500R002C00-Windows-Odbc-X86.tar.gz *.tar
|
||||
del *.tar
|
||||
|
||||
set OUTPUT_DIR=%LIB_ODBC_DIR%/output
|
||||
mkdir "%OUTPUT_DIR%"
|
||||
cp GaussDB-Kernel-V500R002C00-Windows-Odbc-X86.tar.gz %OUTPUT_DIR%
|
||||
|
133
windows/build/psqlodbc-installer/odbc-installer.nsi
Normal file
133
windows/build/psqlodbc-installer/odbc-installer.nsi
Normal file
@ -0,0 +1,133 @@
|
||||
; psqlODBC.nsi
|
||||
;
|
||||
; This script is refered to example2.nsi and created for install psqlODBC.
|
||||
; It will install odbc library into a directory that the user selects.
|
||||
;
|
||||
;--------------------------------
|
||||
|
||||
; The name of the installer
|
||||
Name "psqlODBC"
|
||||
|
||||
; The file to write
|
||||
OutFile "psqlODBC.exe"
|
||||
|
||||
; Request application privileges for Windows Vista and higher
|
||||
RequestExecutionLevel admin
|
||||
|
||||
; Build Unicode installer
|
||||
Unicode True
|
||||
|
||||
; The default installation directory
|
||||
InstallDir $PROGRAMFILES\psqlODBC
|
||||
|
||||
; Registry key to check for directory (so if you install again, it will
|
||||
; overwrite the old one automatically)
|
||||
InstallDirRegKey HKLM "Software\psqlODBC.ODBC.Driver" "Install_Dir"
|
||||
|
||||
;InstallDirRegKey HKLM "SOFTWARE\ODBC\ODBCINST.INI" "PostgreSQL Unicode"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; Pages
|
||||
|
||||
Page components
|
||||
Page directory
|
||||
Page instfiles
|
||||
|
||||
UninstPage uninstConfirm
|
||||
UninstPage instfiles
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; The stuff to install
|
||||
Section "ODBC Driver (required)"
|
||||
|
||||
SectionIn RO
|
||||
|
||||
; Set output path to the installation directory.
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
; Put file there
|
||||
File "win32_dll\libcrypto-1_1.dll"
|
||||
File "win32_dll\libssl-1_1.dll"
|
||||
File "win32_dll\psqlodbc35w.dll"
|
||||
|
||||
SetRegView 32
|
||||
; Write the installation path into the registry
|
||||
WriteRegStr HKLM "SOFTWARE\psqlODBC.ODBC.Driver" "Install_Dir" "$INSTDIR"
|
||||
|
||||
; Write ODBC Driver information into the registry
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" "PostgreSQL Unicode" "Installed"
|
||||
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "APILevel" "1"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "ConnectFunctions" "YYN"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "Driver" "$INSTDIR\psqlodbc35w.dll"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "DriverODBCVer" "03.51"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "FileUsage" "0"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "Setup" "$INSTDIR\psqlodbc35w.dll"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "SQLLevel" "1"
|
||||
WriteRegDWORD HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "UsageCount" 1
|
||||
|
||||
; Write the uninstall keys for Windows
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\psqlODBC" "DisplayName" "psqlODBC"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\psqlODBC" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\psqlODBC" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\psqlODBC" "NoRepair" 1
|
||||
|
||||
SetRegView 64
|
||||
; Write the installation path into the registry
|
||||
WriteRegStr HKLM "SOFTWARE\psqlODBC.ODBC.Driver" "Install_Dir" "$INSTDIR"
|
||||
|
||||
; Write ODBC Driver information into the registry
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" "PostgreSQL Unicode" "Installed"
|
||||
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "APILevel" "1"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "ConnectFunctions" "YYN"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "Driver" "$INSTDIR\psqlodbc35w.dll"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "DriverODBCVer" "03.51"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "FileUsage" "0"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "Setup" "$INSTDIR\psqlodbc35w.dll"
|
||||
WriteRegStr HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "SQLLevel" "1"
|
||||
WriteRegDWORD HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" "UsageCount" 1
|
||||
|
||||
; Write the uninstall keys for Windows
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\psqlODBC" "DisplayName" "psqlODBC"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\psqlODBC" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\psqlODBC" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\psqlODBC" "NoRepair" 1
|
||||
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; Uninstaller
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
SetRegView 32
|
||||
; Remove registry keys
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\psqlODBC"
|
||||
|
||||
DeleteRegKey HKLM "SOFTWARE\psqlODBC.ODBC.Driver"
|
||||
DeleteRegValue HKLM "SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" "PostgreSQL Unicode"
|
||||
DeleteRegKey HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode"
|
||||
|
||||
SetRegView 64
|
||||
; Remove registry keys
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\psqlODBC"
|
||||
|
||||
DeleteRegKey HKLM "SOFTWARE\psqlODBC.ODBC.Driver"
|
||||
DeleteRegValue HKLM "SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" "PostgreSQL Unicode"
|
||||
DeleteRegKey HKLM "SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode"
|
||||
|
||||
; Remove files and uninstaller
|
||||
Delete $INSTDIR\libcrypto-1_1.dll
|
||||
Delete $INSTDIR\libssl-1_1.dll
|
||||
Delete $INSTDIR\psqlodbc35w.dll
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
|
||||
; Remove directories
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
SectionEnd
|
73
windows/build/win32/libpq/CMakeLists-huawei-securec.txt
Normal file
73
windows/build/win32/libpq/CMakeLists-huawei-securec.txt
Normal file
@ -0,0 +1,73 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
|
||||
PROJECT(LIBSECUREC)
|
||||
|
||||
SET(CMAKE_VERBOSE_MAKEFILEON ON)
|
||||
MESSAGE(STATUS "Building LIBSECUREC Library.")
|
||||
|
||||
IF(NOT DEFINED MINGW_DIR)
|
||||
set(MINGW_DIR "D:\\msys32\\mingw32")
|
||||
ENDIF(NOT DEFINED MINGW_DIR)
|
||||
|
||||
SET(PWD_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
SET(MINGW32_DIR ${MINGW_DIR}/"i686-w64-mingw32")
|
||||
SET(LIBRARY_OUTPUT_PATH ${PWD_DIR}/output)
|
||||
SET(CMAKE_C_COMPILER "${MINGW_DIR}/bin/i686-w64-mingw32-gcc")
|
||||
|
||||
IF(NOT DEFINED RELEASE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -std=gnu++11 -D_MINGW32 -fPIC -m32 -w")
|
||||
ELSE(NOT DEFINED RELEASE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -std=gnu++11 -D_MINGW32 -fPIC -m32 -w")
|
||||
ENDIF(NOT DEFINED RELEASE)
|
||||
|
||||
INCLUDE_DIRECTORIES(${PWD_DIR}/include)
|
||||
|
||||
SET(SRC_LIST ${PWD_DIR}/src/fscanf_s.c
|
||||
${PWD_DIR}/src/memmove_s.c
|
||||
${PWD_DIR}/src/snprintf_s.c
|
||||
${PWD_DIR}/src/strncpy_s.c
|
||||
${PWD_DIR}/src/vscanf_s.c
|
||||
${PWD_DIR}/src/vwscanf_s.c
|
||||
${PWD_DIR}/src/wmemcpy_s.c
|
||||
${PWD_DIR}/src/fwscanf_s.c
|
||||
${PWD_DIR}/src/memset_s.c
|
||||
${PWD_DIR}/src/secureinput_a.c
|
||||
${PWD_DIR}/src/sprintf_s.c
|
||||
${PWD_DIR}/src/strtok_s.c
|
||||
${PWD_DIR}/src/vsnprintf_s.c
|
||||
${PWD_DIR}/src/wcscat_s.c
|
||||
${PWD_DIR}/src/wmemmove_s.c
|
||||
${PWD_DIR}/src/gets_s.c
|
||||
${PWD_DIR}/src/secureinput_w.c
|
||||
${PWD_DIR}/src/sscanf_s.c
|
||||
${PWD_DIR}/src/swprintf_s.c
|
||||
${PWD_DIR}/src/vsprintf_s.c
|
||||
${PWD_DIR}/src/wcscpy_s.c
|
||||
${PWD_DIR}/src/wscanf_s.c
|
||||
${PWD_DIR}/src/scanf_s.c
|
||||
${PWD_DIR}/src/strcat_s.c
|
||||
${PWD_DIR}/src/swscanf_s.c
|
||||
${PWD_DIR}/src/vsscanf_s.c
|
||||
${PWD_DIR}/src/wcsncat_s.c
|
||||
${PWD_DIR}/src/secureprintoutput_a.c
|
||||
${PWD_DIR}/src/strcpy_s.c
|
||||
${PWD_DIR}/src/vfscanf_s.c
|
||||
${PWD_DIR}/src/vswprintf_s.c
|
||||
${PWD_DIR}/src/wcsncpy_s.c
|
||||
${PWD_DIR}/src/securecutil.c
|
||||
${PWD_DIR}/src/secureprintoutput_w.c
|
||||
${PWD_DIR}/src/strncat_s.c
|
||||
${PWD_DIR}/src/vfwscanf_s.c
|
||||
${PWD_DIR}/src/vswscanf_s.c
|
||||
${PWD_DIR}/src/wcstok_s.c)
|
||||
# ${PWD_DIR}/src/memcpy_s.o
|
||||
|
||||
|
||||
ADD_LIBRARY(OBJ_LIBSECUREC OBJECT ${SRC_LIST})
|
||||
SET_PROPERTY(TARGET OBJ_LIBSECUREC PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||
|
||||
ADD_LIBRARY(LIB_LIBSECUREC STATIC $<TARGET_OBJECTS:OBJ_LIBSECUREC>)
|
||||
SET_TARGET_PROPERTIES(LIB_LIBSECUREC PROPERTIES PREFIX "")
|
||||
SET_TARGET_PROPERTIES(LIB_LIBSECUREC PROPERTIES OUTPUT_NAME "libsecurec")
|
||||
SET_TARGET_PROPERTIES(LIB_LIBSECUREC PROPERTIES SUFFIX ".lib")
|
||||
|
||||
|
114
windows/build/win32/libpq/CMakeLists.txt
Normal file
114
windows/build/win32/libpq/CMakeLists.txt
Normal file
@ -0,0 +1,114 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
|
||||
PROJECT(LIBPQ)
|
||||
|
||||
SET(CMAKE_VERBOSE_MAKEFILEON ON)
|
||||
|
||||
MESSAGE(STATUS "Building LIBPQ Library.")
|
||||
|
||||
IF(NOT DEFINED OPENSSL_DIR)
|
||||
set(OPENSSL_DIR "D:\\Program_Files\\OpenSSL-Win32")
|
||||
ENDIF(NOT DEFINED OPENSSL_DIR)
|
||||
IF(NOT DEFINED MINGW_DIR)
|
||||
set(MINGW_DIR "D:\\buildtools\\mingw-8.1.0\\msys32\\mingw32")
|
||||
ENDIF(NOT DEFINED MINGW_DIR)
|
||||
|
||||
SET(MINGW32_DIR ${MINGW_DIR}/"i686-w64-mingw32")
|
||||
SET(PWD_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
SET(LIBRARY_OUTPUT_PATH ${PWD_DIR}/output)
|
||||
|
||||
SET(CMAKE_CXX_COMPILER "${MINGW_DIR}/bin/i686-w64-mingw32-c++")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "-static") #-static-libgcc -static-libstdc++"
|
||||
|
||||
IF(NOT DEFINED RELEASE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DWIN32 -DFRONTEND -D_MINGW32 -fPIC -fpermissive -no-pthread -m32 -w")
|
||||
ELSE(NOT DEFINED RELEASE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -DWIN32 -DFRONTEND -D_MINGW32 -fPIC -fpermissive -no-pthread -m32 -w")
|
||||
ENDIF(NOT DEFINED RELEASE)
|
||||
|
||||
SET(DEF_FILE ${PWD_DIR}/src/common/interfaces/libpq/libpqdll.def)
|
||||
|
||||
INCLUDE_DIRECTORIES(${PWD_DIR}/include
|
||||
${PWD_DIR}/include/port
|
||||
${PWD_DIR}/include/port/win32
|
||||
${PWD_DIR}/src
|
||||
${PWD_DIR}/src/common/interfaces/libpq/client_logic_processor
|
||||
${PWD_DIR}/src/common/interfaces/libpq/client_logic_hooks
|
||||
${PWD_DIR}/src/common/interfaces/libpq/client_logic_common
|
||||
${PWD_DIR}/src/common/interfaces/libpq/client_logic_cache
|
||||
${PWD_DIR}/src/common/port
|
||||
${PWD_DIR}/src/common/interfaces/libpq
|
||||
${PWD_DIR}/src/common/interfaces/libpq/frontend_parser
|
||||
${OPENSSL_DIR}/include
|
||||
${MINGW_DIR}/include
|
||||
${MINGW32_DIR}/include)
|
||||
|
||||
SET(SRC_LIST ${PWD_DIR}/src/common/port/win32setlocale.cpp
|
||||
${PWD_DIR}/src/common/port/win32env.cpp
|
||||
${PWD_DIR}/src/common/port/strlcpy.cpp
|
||||
${PWD_DIR}/src/common/port/pgstrcasecmp.cpp
|
||||
${PWD_DIR}/src/common/port/noblock.cpp
|
||||
${PWD_DIR}/src/common/port/inet_aton.cpp
|
||||
${PWD_DIR}/src/common/port/gs_strerror.cpp
|
||||
${PWD_DIR}/src/common/port/gs_env_r.cpp
|
||||
${PWD_DIR}/src/common/port/dirmod.cpp
|
||||
${PWD_DIR}/src/common/port/cipher.cpp
|
||||
${PWD_DIR}/src/common/port/win32error.cpp
|
||||
${PWD_DIR}/src/common/port/thread.cpp
|
||||
${PWD_DIR}/src/common/port/pgsleep.cpp
|
||||
${PWD_DIR}/src/common/port/path.cpp
|
||||
${PWD_DIR}/src/common/port/inet_net_ntop.cpp
|
||||
${PWD_DIR}/src/common/port/gs_syscall_lock.cpp
|
||||
${PWD_DIR}/src/common/port/gs_readdir.cpp
|
||||
${PWD_DIR}/src/common/port/getaddrinfo.cpp
|
||||
${PWD_DIR}/src/common/port/dirent.cpp
|
||||
${PWD_DIR}/src/common/port/chklocale.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/pthread-win32.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/pqexpbuffer.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/fe-protocol3.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/fe-misc.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/fe-connect.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/win32.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/fe-protocol2.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/fe-lobj.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/pqsignal.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/libpq-events.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/fe-secure.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/fe-print.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/fe-exec.cpp
|
||||
${PWD_DIR}/src/common/interfaces/libpq/fe-auth.cpp
|
||||
${PWD_DIR}/src/common/backend/utils/mb/encnames.cpp
|
||||
${PWD_DIR}/src/common/backend/utils/mb/wchar.cpp
|
||||
${PWD_DIR}/src/common/backend/libpq/sha2.cpp
|
||||
${PWD_DIR}/src/common/backend/libpq/md5.cpp
|
||||
${PWD_DIR}/src/common/backend/libpq/ip.cpp)
|
||||
|
||||
LINK_DIRECTORIES(${MINGW_DIR}/bin
|
||||
${MINGW_DIR}/lib
|
||||
${MINGW32_DIR}/lib)
|
||||
|
||||
ADD_LIBRARY(OBJ_LIBPQ OBJECT ${SRC_LIST})
|
||||
SET_PROPERTY(TARGET OBJ_LIBPQ PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||
|
||||
ADD_LIBRARY(LIB_LIBPQ STATIC $<TARGET_OBJECTS:OBJ_LIBPQ>)
|
||||
SET_TARGET_PROPERTIES(LIB_LIBPQ PROPERTIES PREFIX "")
|
||||
SET_TARGET_PROPERTIES(LIB_LIBPQ PROPERTIES OUTPUT_NAME "libpq")
|
||||
SET_TARGET_PROPERTIES(LIB_LIBPQ PROPERTIES SUFFIX ".lib")
|
||||
|
||||
ADD_LIBRARY(DLL_LIBPQ SHARED $<TARGET_OBJECTS:OBJ_LIBPQ> ${DEF_FILE})
|
||||
SET_TARGET_PROPERTIES(DLL_LIBPQ PROPERTIES PREFIX "")
|
||||
SET_TARGET_PROPERTIES(DLL_LIBPQ PROPERTIES OUTPUT_NAME "libpq")
|
||||
|
||||
FIND_LIBRARY(LIB_CRYPTO NAMES crypto PATHS ${OPENSSL_DIR}/lib)
|
||||
FIND_LIBRARY(LIB_SSL NAMES ssl PATHS ${OPENSSL_DIR}/lib)
|
||||
FIND_LIBRARY(LIB_OPENSSL NAMES openssl PATHS ${OPENSSL_DIR}/lib)
|
||||
FIND_LIBRARY(LIB_SECUREC NAMES securec PATHS ${PWD_DIR}/lib)
|
||||
|
||||
TARGET_LINK_LIBRARIES(DLL_LIBPQ
|
||||
-lwsock32
|
||||
-lws2_32
|
||||
-lsecur32
|
||||
-lsecurity
|
||||
-lpthread
|
||||
${LIB_CRYPTO} ${LIB_SSL}
|
||||
${LIB_OPENSSL} ${LIB_SECUREC})
|
||||
|
175
windows/build/win32/libpq/Makefile
Normal file
175
windows/build/win32/libpq/Makefile
Normal file
@ -0,0 +1,175 @@
|
||||
#################################################################
|
||||
## Makefile for building libpq library on Windows using MinGW ##
|
||||
#################################################################
|
||||
|
||||
ifndef $(OPENSSL_DIR)
|
||||
OPENSSL_DIR:=/d/Program_Files/OpenSSL-Win32
|
||||
endif
|
||||
|
||||
ifndef $(MINGW_DIR)
|
||||
MINGW_DIR:=/d/msys32/mingw32
|
||||
endif
|
||||
|
||||
PWD_DIR:=$(shell pwd)
|
||||
MINGW32_DIR:=$(MINGW_DIR)/i686-w64-mingw32
|
||||
OUT_DIR:=$(PWD_DIR)/output
|
||||
OBJ_DIR:=$(PWD_DIR)/obj
|
||||
|
||||
DLL_TARGET:=$(OUT_DIR)/libpq.dll
|
||||
LIB_TARGET:=$(OUT_DIR)/libpq.lib
|
||||
|
||||
CC:=$(MINGW_DIR)/bin/i686-w64-mingw32-c++
|
||||
AR:=$(MINGW_DIR)/bin/i686-w64-mingw32-gcc-ar
|
||||
|
||||
MD:=mkdir -p
|
||||
RM:=rm -rf
|
||||
|
||||
DEFFILE:=$(PWD_DIR)/src/common/interfaces/libpq/libpqdll.def
|
||||
|
||||
CCFLAG:=-DWIN32 \
|
||||
-DFRONTEND \
|
||||
-D_MINGW32 \
|
||||
-fpermissive \
|
||||
-no-pthread \
|
||||
-m32 \
|
||||
-w
|
||||
|
||||
ifdef $(RELEASE)
|
||||
CCFLAG:=$(CCFLAG) -O2
|
||||
else
|
||||
CCFLAG:=$(CCFLAG) -g
|
||||
endif
|
||||
|
||||
LFLAG:=-L$(OPENSSL_DIR)/lib \
|
||||
-L$(PWD_DIR)/lib \
|
||||
-L$(MINGW_DIR)/bin \
|
||||
-L$(MINGW32_DIR)/lib \
|
||||
-llibcrypto \
|
||||
-llibssl \
|
||||
-lwsock32 \
|
||||
-lws2_32 \
|
||||
-lsecur32 \
|
||||
-lsecurity \
|
||||
-lopenssl \
|
||||
-llibsecurec
|
||||
|
||||
INCLUDE:=-I$(PWD_DIR)/include \
|
||||
-I$(PWD_DIR)/include/port \
|
||||
-I$(PWD_DIR)/include/port/win32 \
|
||||
-I$(PWD_DIR)/src \
|
||||
-I$(PWD_DIR)/src/common/interfaces/libpq/client_logic_processor \
|
||||
-I$(PWD_DIR)/src/common/interfaces/libpq/client_logic_hooks \
|
||||
-I$(PWD_DIR)/src/common/interfaces/libpq/client_logic_common \
|
||||
-I$(PWD_DIR)/src/common/interfaces/libpq/client_logic_cache \
|
||||
-I$(PWD_DIR)/src/common/port \
|
||||
-I$(PWD_DIR)/src/common/interfaces/libpq \
|
||||
-I$(PWD_DIR)/src/common/interfaces/libpq/frontend_parser \
|
||||
-I$(OPENSSL_DIR)/include \
|
||||
-I$(MINGW_DIR)/include \
|
||||
-I$(MINGW32_DIR)/include
|
||||
|
||||
SRC:=$(PWD_DIR)/src/common/port/win32setlocale.cpp \
|
||||
$(PWD_DIR)/src/common/port/win32env.cpp \
|
||||
$(PWD_DIR)/src/common/port/strlcpy.cpp \
|
||||
$(PWD_DIR)/src/common/port/pgstrcasecmp.cpp \
|
||||
$(PWD_DIR)/src/common/port/noblock.cpp \
|
||||
$(PWD_DIR)/src/common/port/inet_aton.cpp \
|
||||
$(PWD_DIR)/src/common/port/gs_strerror.cpp \
|
||||
$(PWD_DIR)/src/common/port/gs_env_r.cpp \
|
||||
$(PWD_DIR)/src/common/port/dirmod.cpp \
|
||||
$(PWD_DIR)/src/common/port/cipher.cpp \
|
||||
$(PWD_DIR)/src/common/port/win32error.cpp \
|
||||
$(PWD_DIR)/src/common/port/thread.cpp \
|
||||
$(PWD_DIR)/src/common/port/pgsleep.cpp \
|
||||
$(PWD_DIR)/src/common/port/path.cpp \
|
||||
$(PWD_DIR)/src/common/port/inet_net_ntop.cpp \
|
||||
$(PWD_DIR)/src/common/port/gs_syscall_lock.cpp \
|
||||
$(PWD_DIR)/src/common/port/gs_readdir.cpp \
|
||||
$(PWD_DIR)/src/common/port/getaddrinfo.cpp \
|
||||
$(PWD_DIR)/src/common/port/dirent.cpp \
|
||||
$(PWD_DIR)/src/common/port/chklocale.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/pthread-win32.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/pqexpbuffer.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/fe-protocol3.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/fe-misc.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/fe-connect.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/win32.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/fe-protocol2.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/fe-lobj.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/pqsignal.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/libpq-events.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/fe-secure.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/fe-print.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/fe-exec.cpp \
|
||||
$(PWD_DIR)/src/common/interfaces/libpq/fe-auth.cpp \
|
||||
$(PWD_DIR)/src/common/backend/utils/mb/encnames.cpp \
|
||||
$(PWD_DIR)/src/common/backend/utils/mb/wchar.cpp \
|
||||
$(PWD_DIR)/src/common/backend/libpq/sha2.cpp \
|
||||
$(PWD_DIR)/src/common/backend/libpq/md5.cpp \
|
||||
$(PWD_DIR)/src/common/backend/libpq/ip.cpp
|
||||
|
||||
OBJ:=$(OBJ_DIR)/win32setlocale.o \
|
||||
$(OBJ_DIR)/win32env.o \
|
||||
$(OBJ_DIR)/strlcpy.o \
|
||||
$(OBJ_DIR)/pgstrcasecmp.o\
|
||||
$(OBJ_DIR)/noblock.o \
|
||||
$(OBJ_DIR)/inet_aton.o \
|
||||
$(OBJ_DIR)/gs_strerror.o \
|
||||
$(OBJ_DIR)/gs_env_r.o \
|
||||
$(OBJ_DIR)/dirmod.o \
|
||||
$(OBJ_DIR)/cipher.o \
|
||||
$(OBJ_DIR)/win32error.o \
|
||||
$(OBJ_DIR)/thread.o \
|
||||
$(OBJ_DIR)/pgsleep.o \
|
||||
$(OBJ_DIR)/path.o \
|
||||
$(OBJ_DIR)/inet_net_ntop.o \
|
||||
$(OBJ_DIR)/gs_syscall_lock.o \
|
||||
$(OBJ_DIR)/gs_readdir.o \
|
||||
$(OBJ_DIR)/getaddrinfo.o \
|
||||
$(OBJ_DIR)/dirent.o \
|
||||
$(OBJ_DIR)/chklocale.o \
|
||||
$(OBJ_DIR)/pthread-win32.o \
|
||||
$(OBJ_DIR)/pqexpbuffer.o \
|
||||
$(OBJ_DIR)/fe-protocol3.o \
|
||||
$(OBJ_DIR)/fe-misc.o \
|
||||
$(OBJ_DIR)/fe-connect.o \
|
||||
$(OBJ_DIR)/win32.o \
|
||||
$(OBJ_DIR)/fe-protocol2.o \
|
||||
$(OBJ_DIR)/fe-lobj.o \
|
||||
$(OBJ_DIR)/pqsignal.o \
|
||||
$(OBJ_DIR)/libpq-events.o \
|
||||
$(OBJ_DIR)/fe-secure.o \
|
||||
$(OBJ_DIR)/fe-print.o \
|
||||
$(OBJ_DIR)/fe-exec.o \
|
||||
$(OBJ_DIR)/fe-auth.o \
|
||||
$(OBJ_DIR)/encnames.o \
|
||||
$(OBJ_DIR)/wchar.o \
|
||||
$(OBJ_DIR)/sha2.o \
|
||||
$(OBJ_DIR)/md5.o \
|
||||
$(OBJ_DIR)/ip.o
|
||||
|
||||
SRC_TO_OBJ=$(OBJ_DIR)/$(patsubst %.cpp,%.o, $(notdir $(1)))
|
||||
|
||||
define BUILD_OBJ
|
||||
$(call SRC_TO_OBJ,$(1)):$(1)
|
||||
$(CC) $(CCFLAG) $(INCLUDE) -c $$^ -o $$@
|
||||
endef
|
||||
|
||||
all:dirs $(OBJ)
|
||||
$(CC) $(OBJ) $(DEFFILE) -static -shared -o $(DLL_TARGET) $(LFLAG)
|
||||
$(AR) rcs $(LIB_TARGET) $(OBJ)
|
||||
|
||||
dirs:
|
||||
$(MD) $(OBJ_DIR)
|
||||
$(MD) $(OUT_DIR)
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJ_DIR)
|
||||
$(RM) $(OUT_DIR)
|
||||
|
||||
$(foreach c,$(SRC),$(eval $(call BUILD_OBJ,$(c))))
|
||||
|
||||
.PHONY: all clean dirs
|
||||
#################################################################
|
||||
## THE END OF LIBPQ MINGW32 Makefile ##
|
||||
#################################################################
|
467
windows/build/win32/libpq/include/errcodes.h
Normal file
467
windows/build/win32/libpq/include/errcodes.h
Normal file
@ -0,0 +1,467 @@
|
||||
/* autogenerated from src/backend/utils/errcodes.txt, do not edit */
|
||||
/* there is deliberately not an #ifndef ERRCODES_H here */
|
||||
|
||||
/* Class 00 - Successful Completion */
|
||||
#define ERRCODE_SUCCESSFUL_COMPLETION MAKE_SQLSTATE('0','0','0','0','0')
|
||||
|
||||
/* Class 01 - Warning */
|
||||
#define ERRCODE_WARNING MAKE_SQLSTATE('0','1','0','0','0')
|
||||
#define ERRCODE_WARNING_DYNAMIC_RESULT_SETS_RETURNED MAKE_SQLSTATE('0','1','0','0','C')
|
||||
#define ERRCODE_WARNING_IMPLICIT_ZERO_BIT_PADDING MAKE_SQLSTATE('0','1','0','0','8')
|
||||
#define ERRCODE_WARNING_NULL_VALUE_ELIMINATED_IN_SET_FUNCTION MAKE_SQLSTATE('0','1','0','0','3')
|
||||
#define ERRCODE_WARNING_PRIVILEGE_NOT_GRANTED MAKE_SQLSTATE('0','1','0','0','7')
|
||||
#define ERRCODE_WARNING_PRIVILEGE_NOT_REVOKED MAKE_SQLSTATE('0','1','0','0','6')
|
||||
#define ERRCODE_WARNING_STRING_DATA_RIGHT_TRUNCATION MAKE_SQLSTATE('0','1','0','0','4')
|
||||
#define ERRCODE_WARNING_DEPRECATED_FEATURE MAKE_SQLSTATE('0','1','P','0','1')
|
||||
|
||||
/* Class 02 - No Data (this is also a warning class per the SQL standard) */
|
||||
#define ERRCODE_NO_DATA MAKE_SQLSTATE('0','2','0','0','0')
|
||||
#define ERRCODE_NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED MAKE_SQLSTATE('0','2','0','0','1')
|
||||
#define ERRCODE_INVALID_OPTION MAKE_SQLSTATE('0','2','0','0','2')
|
||||
|
||||
/* Class 03 - SQL Statement Not Yet Complete */
|
||||
#define ERRCODE_SQL_STATEMENT_NOT_YET_COMPLETE MAKE_SQLSTATE('0','3','0','0','0')
|
||||
|
||||
/* Class 08 - Connection Exception */
|
||||
#define ERRCODE_CONNECTION_EXCEPTION MAKE_SQLSTATE('0','8','0','0','0')
|
||||
#define ERRCODE_CONNECTION_DOES_NOT_EXIST MAKE_SQLSTATE('0','8','0','0','3')
|
||||
#define ERRCODE_CONNECTION_FAILURE MAKE_SQLSTATE('0','8','0','0','6')
|
||||
#define ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION MAKE_SQLSTATE('0','8','0','0','1')
|
||||
#define ERRCODE_SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION MAKE_SQLSTATE('0','8','0','0','4')
|
||||
#define ERRCODE_TRANSACTION_RESOLUTION_UNKNOWN MAKE_SQLSTATE('0','8','0','0','7')
|
||||
#define ERRCODE_PROTOCOL_VIOLATION MAKE_SQLSTATE('0','8','P','0','1')
|
||||
|
||||
/* Class 09 - Triggered Action Exception */
|
||||
#define ERRCODE_TRIGGERED_ACTION_EXCEPTION MAKE_SQLSTATE('0','9','0','0','0')
|
||||
|
||||
/* Class 0A - Feature Not Supported */
|
||||
#define ERRCODE_FEATURE_NOT_SUPPORTED MAKE_SQLSTATE('0','A','0','0','0')
|
||||
#define ERRCODE_STREAM_NOT_SUPPORTED MAKE_SQLSTATE('0','A','1','0','0')
|
||||
|
||||
/* Class 0B - Invalid Transaction Initiation */
|
||||
#define ERRCODE_INVALID_TRANSACTION_INITIATION MAKE_SQLSTATE('0','B','0','0','0')
|
||||
|
||||
/* Class 0F - Locator Exception */
|
||||
#define ERRCODE_LOCATOR_EXCEPTION MAKE_SQLSTATE('0','F','0','0','0')
|
||||
#define ERRCODE_L_E_INVALID_SPECIFICATION MAKE_SQLSTATE('0','F','0','0','1')
|
||||
|
||||
/* Class 0L - Invalid Grantor */
|
||||
#define ERRCODE_INVALID_GRANTOR MAKE_SQLSTATE('0','L','0','0','0')
|
||||
#define ERRCODE_INVALID_GRANT_OPERATION MAKE_SQLSTATE('0','L','P','0','1')
|
||||
|
||||
/* Class 0P - Invalid Role Specification */
|
||||
#define ERRCODE_INVALID_ROLE_SPECIFICATION MAKE_SQLSTATE('0','P','0','0','0')
|
||||
|
||||
/* Class 0Z - Diagnostics Exception */
|
||||
#define ERRCODE_DIAGNOSTICS_EXCEPTION MAKE_SQLSTATE('0','Z','0','0','0')
|
||||
#define ERRCODE_STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER MAKE_SQLSTATE('0','Z','0','0','2')
|
||||
|
||||
/* Class 20 - Case Not Found */
|
||||
#define ERRCODE_CASE_NOT_FOUND MAKE_SQLSTATE('2','0','0','0','0')
|
||||
|
||||
/* Class 21 - Cardinality Violation */
|
||||
#define ERRCODE_CARDINALITY_VIOLATION MAKE_SQLSTATE('2','1','0','0','0')
|
||||
|
||||
/* Class 22 - Data Exception */
|
||||
#define ERRCODE_DATA_EXCEPTION MAKE_SQLSTATE('2','2','0','0','0')
|
||||
#define ERRCODE_ARRAY_ELEMENT_ERROR MAKE_SQLSTATE('2','2','0','0','E')
|
||||
#define ERRCODE_ARRAY_SUBSCRIPT_ERROR MAKE_SQLSTATE('2','2','0','2','E')
|
||||
#define ERRCODE_CHARACTER_NOT_IN_REPERTOIRE MAKE_SQLSTATE('2','2','0','2','1')
|
||||
#define ERRCODE_DATETIME_FIELD_OVERFLOW MAKE_SQLSTATE('2','2','0','0','8')
|
||||
#define ERRCODE_DATETIME_VALUE_OUT_OF_RANGE MAKE_SQLSTATE('2','2','0','2','0')
|
||||
#define ERRCODE_DIVISION_BY_ZERO MAKE_SQLSTATE('2','2','0','1','2')
|
||||
#define ERRCODE_ERROR_IN_ASSIGNMENT MAKE_SQLSTATE('2','2','0','0','5')
|
||||
#define ERRCODE_ESCAPE_CHARACTER_CONFLICT MAKE_SQLSTATE('2','2','0','0','B')
|
||||
#define ERRCODE_INDICATOR_OVERFLOW MAKE_SQLSTATE('2','2','0','2','2')
|
||||
#define ERRCODE_INTERVAL_FIELD_OVERFLOW MAKE_SQLSTATE('2','2','0','1','5')
|
||||
#define ERRCODE_INVALID_ARGUMENT_FOR_LOG MAKE_SQLSTATE('2','2','0','1','E')
|
||||
#define ERRCODE_INVALID_ARGUMENT_FOR_NTILE MAKE_SQLSTATE('2','2','0','1','4')
|
||||
#define ERRCODE_INVALID_ARGUMENT_FOR_NTH_VALUE MAKE_SQLSTATE('2','2','0','1','6')
|
||||
#define ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION MAKE_SQLSTATE('2','2','0','1','F')
|
||||
#define ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION MAKE_SQLSTATE('2','2','0','1','G')
|
||||
#define ERRCODE_INVALID_CHARACTER_VALUE_FOR_CAST MAKE_SQLSTATE('2','2','0','1','8')
|
||||
#define ERRCODE_INVALID_DATETIME_FORMAT MAKE_SQLSTATE('2','2','0','0','7')
|
||||
#define ERRCODE_INVALID_ESCAPE_CHARACTER MAKE_SQLSTATE('2','2','0','1','9')
|
||||
#define ERRCODE_INVALID_ESCAPE_OCTET MAKE_SQLSTATE('2','2','0','0','D')
|
||||
#define ERRCODE_INVALID_ESCAPE_SEQUENCE MAKE_SQLSTATE('2','2','0','2','5')
|
||||
#define ERRCODE_NONSTANDARD_USE_OF_ESCAPE_CHARACTER MAKE_SQLSTATE('2','2','P','0','6')
|
||||
#define ERRCODE_INVALID_INDICATOR_PARAMETER_VALUE MAKE_SQLSTATE('2','2','0','1','0')
|
||||
#define ERRCODE_INVALID_PARAMETER_VALUE MAKE_SQLSTATE('2','2','0','2','3')
|
||||
#define ERRCODE_INVALID_REGULAR_EXPRESSION MAKE_SQLSTATE('2','2','0','1','B')
|
||||
#define ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE MAKE_SQLSTATE('2','2','0','1','W')
|
||||
#define ERRCODE_INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE MAKE_SQLSTATE('2','2','0','1','X')
|
||||
#define ERRCODE_INVALID_TIME_ZONE_DISPLACEMENT_VALUE MAKE_SQLSTATE('2','2','0','0','9')
|
||||
#define ERRCODE_INVALID_USE_OF_ESCAPE_CHARACTER MAKE_SQLSTATE('2','2','0','0','C')
|
||||
#define ERRCODE_MOST_SPECIFIC_TYPE_MISMATCH MAKE_SQLSTATE('2','2','0','0','G')
|
||||
#define ERRCODE_NULL_VALUE_NOT_ALLOWED MAKE_SQLSTATE('2','2','0','0','4')
|
||||
#define ERRCODE_NULL_VALUE_NO_INDICATOR_PARAMETER MAKE_SQLSTATE('2','2','0','0','2')
|
||||
#define ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE MAKE_SQLSTATE('2','2','0','0','3')
|
||||
#define ERRCODE_DOP_VALUE_OUT_OF_RANGE MAKE_SQLSTATE('2','2','0','1','7')
|
||||
#define ERRCODE_STRING_DATA_LENGTH_MISMATCH MAKE_SQLSTATE('2','2','0','2','6')
|
||||
#define ERRCODE_REGEXP_MISMATCH MAKE_SQLSTATE('2','2','0','2','8')
|
||||
#define ERRCODE_STRING_DATA_RIGHT_TRUNCATION MAKE_SQLSTATE('2','2','0','0','1')
|
||||
#define ERRCODE_SUBSTRING_ERROR MAKE_SQLSTATE('2','2','0','1','1')
|
||||
#define ERRCODE_TRIM_ERROR MAKE_SQLSTATE('2','2','0','2','7')
|
||||
#define ERRCODE_UNTERMINATED_C_STRING MAKE_SQLSTATE('2','2','0','2','4')
|
||||
#define ERRCODE_ZERO_LENGTH_CHARACTER_STRING MAKE_SQLSTATE('2','2','0','0','F')
|
||||
#define ERRCODE_FLOATING_POINT_EXCEPTION MAKE_SQLSTATE('2','2','P','0','1')
|
||||
#define ERRCODE_INVALID_TEXT_REPRESENTATION MAKE_SQLSTATE('2','2','P','0','2')
|
||||
#define ERRCODE_INVALID_BINARY_REPRESENTATION MAKE_SQLSTATE('2','2','P','0','3')
|
||||
#define ERRCODE_BAD_COPY_FILE_FORMAT MAKE_SQLSTATE('2','2','P','0','4')
|
||||
#define ERRCODE_UNTRANSLATABLE_CHARACTER MAKE_SQLSTATE('2','2','P','0','5')
|
||||
#define ERRCODE_NOT_AN_XML_DOCUMENT MAKE_SQLSTATE('2','2','0','0','L')
|
||||
#define ERRCODE_INVALID_XML_DOCUMENT MAKE_SQLSTATE('2','2','0','0','M')
|
||||
#define ERRCODE_INVALID_XML_CONTENT MAKE_SQLSTATE('2','2','0','0','N')
|
||||
#define ERRCODE_INVALID_XML_ERROR_CONTEXT MAKE_SQLSTATE('2','2','0','0','O')
|
||||
#define ERRCODE_INVALID_XML_COMMENT MAKE_SQLSTATE('2','2','0','0','S')
|
||||
#define ERRCODE_INVALID_XML_PROCESSING_INSTRUCTION MAKE_SQLSTATE('2','2','0','0','T')
|
||||
|
||||
/* Class 23 - Integrity Constraint Violation */
|
||||
#define ERRCODE_INTEGRITY_CONSTRAINT_VIOLATION MAKE_SQLSTATE('2','3','0','0','0')
|
||||
#define ERRCODE_RESTRICT_VIOLATION MAKE_SQLSTATE('2','3','0','0','1')
|
||||
#define ERRCODE_NOT_NULL_VIOLATION MAKE_SQLSTATE('2','3','5','0','2')
|
||||
#define ERRCODE_FOREIGN_KEY_VIOLATION MAKE_SQLSTATE('2','3','5','0','3')
|
||||
#define ERRCODE_UNIQUE_VIOLATION MAKE_SQLSTATE('2','3','5','0','5')
|
||||
#define ERRCODE_CHECK_VIOLATION MAKE_SQLSTATE('2','3','5','1','4')
|
||||
#define ERRCODE_EXCLUSION_VIOLATION MAKE_SQLSTATE('2','3','P','0','1')
|
||||
|
||||
/* Class 24 - Invalid Cursor State */
|
||||
#define ERRCODE_INVALID_CURSOR_STATE MAKE_SQLSTATE('2','4','0','0','0')
|
||||
|
||||
/* Class 25 - Invalid Transaction State */
|
||||
#define ERRCODE_INVALID_TRANSACTION_STATE MAKE_SQLSTATE('2','5','0','0','0')
|
||||
#define ERRCODE_ACTIVE_SQL_TRANSACTION MAKE_SQLSTATE('2','5','0','0','1')
|
||||
#define ERRCODE_BRANCH_TRANSACTION_ALREADY_ACTIVE MAKE_SQLSTATE('2','5','0','0','2')
|
||||
#define ERRCODE_HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL MAKE_SQLSTATE('2','5','0','0','8')
|
||||
#define ERRCODE_INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION MAKE_SQLSTATE('2','5','0','0','3')
|
||||
#define ERRCODE_INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION MAKE_SQLSTATE('2','5','0','0','4')
|
||||
#define ERRCODE_NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION MAKE_SQLSTATE('2','5','0','0','5')
|
||||
#define ERRCODE_READ_ONLY_SQL_TRANSACTION MAKE_SQLSTATE('2','5','0','0','6')
|
||||
#define ERRCODE_SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED MAKE_SQLSTATE('2','5','0','0','7')
|
||||
#define ERRCODE_RUN_TRANSACTION_DURING_RECOVERY MAKE_SQLSTATE('2','5','0','0','9')
|
||||
#define ERRCODE_GXID_DOES_NOT_EXIST MAKE_SQLSTATE('2','5','0','1','0')
|
||||
#define ERRCODE_NO_ACTIVE_SQL_TRANSACTION MAKE_SQLSTATE('2','5','P','0','1')
|
||||
#define ERRCODE_IN_FAILED_SQL_TRANSACTION MAKE_SQLSTATE('2','5','P','0','2')
|
||||
|
||||
/* Class 26 - Invalid SQL Statement Name */
|
||||
#define ERRCODE_INVALID_SQL_STATEMENT_NAME MAKE_SQLSTATE('2','6','0','0','0')
|
||||
#define ERRCODE_SLOW_QUERY MAKE_SQLSTATE('2','6','0','0','1')
|
||||
#define ERRCODE_ACTIVE_SESSION_PROFILE MAKE_SQLSTATE('2','6','0','0','2')
|
||||
|
||||
/* Class 27 - Triggered Data Change Violation */
|
||||
#define ERRCODE_TRIGGERED_DATA_CHANGE_VIOLATION MAKE_SQLSTATE('2','7','0','0','0')
|
||||
#define ERRCODE_TRIGGERED_INVALID_TUPLE MAKE_SQLSTATE('2','7','0','0','1')
|
||||
|
||||
/* Class 28 - Invalid Authorization Specification */
|
||||
#define ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION MAKE_SQLSTATE('2','8','0','0','0')
|
||||
#define ERRCODE_INVALID_PASSWORD MAKE_SQLSTATE('2','8','P','0','1')
|
||||
#define ERRCODE_INITIAL_PASSWORD_NOT_MODIFIED MAKE_SQLSTATE('2','8','P','0','2')
|
||||
|
||||
/* Class 29 - Invalid or Unexpected Status */
|
||||
#define ERRCODE_INVALID_STATUS MAKE_SQLSTATE('2','9','0','0','0')
|
||||
#define ERRCODE_INVALID_TABLESAMPLE_ARGUMENT MAKE_SQLSTATE('2','9','0','0','1')
|
||||
#define ERRCODE_INVALID_TABLESAMPLE_REPEAT MAKE_SQLSTATE('2','9','0','0','2')
|
||||
#define ERRORCODE_ASSERT_FAILED MAKE_SQLSTATE('2','9','0','0','3')
|
||||
#define ERRCODE_CACHE_LOOKUP_FAILED MAKE_SQLSTATE('2','9','P','0','1')
|
||||
#define ERRCODE_FETCH_DATA_FAILED MAKE_SQLSTATE('2','9','P','0','2')
|
||||
#define ERRCODE_FLUSH_DATA_SIZE_MISMATCH MAKE_SQLSTATE('2','9','P','0','3')
|
||||
#define ERRCODE_RELATION_OPEN_ERROR MAKE_SQLSTATE('2','9','P','0','4')
|
||||
#define ERRCODE_RELATION_CLOSE_ERROR MAKE_SQLSTATE('2','9','P','0','5')
|
||||
#define ERRCODE_INVALID_CACHE_PLAN MAKE_SQLSTATE('2','9','P','0','6')
|
||||
|
||||
/* Class 2B - Dependent Privilege Descriptors Still Exist */
|
||||
#define ERRCODE_DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST MAKE_SQLSTATE('2','B','0','0','0')
|
||||
#define ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST MAKE_SQLSTATE('2','B','P','0','1')
|
||||
|
||||
/* Class 2D - Invalid Transaction Termination */
|
||||
#define ERRCODE_INVALID_TRANSACTION_TERMINATION MAKE_SQLSTATE('2','D','0','0','0')
|
||||
|
||||
/* Class 2F - SQL Routine Exception */
|
||||
#define ERRCODE_SQL_ROUTINE_EXCEPTION MAKE_SQLSTATE('2','F','0','0','0')
|
||||
#define ERRCODE_S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT MAKE_SQLSTATE('2','F','0','0','5')
|
||||
#define ERRCODE_S_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED MAKE_SQLSTATE('2','F','0','0','2')
|
||||
#define ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED MAKE_SQLSTATE('2','F','0','0','3')
|
||||
#define ERRCODE_S_R_E_READING_SQL_DATA_NOT_PERMITTED MAKE_SQLSTATE('2','F','0','0','4')
|
||||
|
||||
/* Class 34 - Invalid Cursor Name */
|
||||
#define ERRCODE_INVALID_CURSOR_NAME MAKE_SQLSTATE('3','4','0','0','0')
|
||||
|
||||
/* Class 38 - External Routine Exception */
|
||||
#define ERRCODE_EXTERNAL_ROUTINE_EXCEPTION MAKE_SQLSTATE('3','8','0','0','0')
|
||||
#define ERRCODE_E_R_E_CONTAINING_SQL_NOT_PERMITTED MAKE_SQLSTATE('3','8','0','0','1')
|
||||
#define ERRCODE_E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED MAKE_SQLSTATE('3','8','0','0','2')
|
||||
#define ERRCODE_E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED MAKE_SQLSTATE('3','8','0','0','3')
|
||||
#define ERRCODE_E_R_E_READING_SQL_DATA_NOT_PERMITTED MAKE_SQLSTATE('3','8','0','0','4')
|
||||
|
||||
/* Class 39 - External Routine Invocation Exception */
|
||||
#define ERRCODE_EXTERNAL_ROUTINE_INVOCATION_EXCEPTION MAKE_SQLSTATE('3','9','0','0','0')
|
||||
#define ERRCODE_E_R_I_E_INVALID_SQLSTATE_RETURNED MAKE_SQLSTATE('3','9','0','0','1')
|
||||
#define ERRCODE_E_R_I_E_NULL_VALUE_NOT_ALLOWED MAKE_SQLSTATE('3','9','0','0','4')
|
||||
#define ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED MAKE_SQLSTATE('3','9','P','0','1')
|
||||
#define ERRCODE_E_R_I_E_SRF_PROTOCOL_VIOLATED MAKE_SQLSTATE('3','9','P','0','2')
|
||||
|
||||
/* Class 3B - Savepoint Exception */
|
||||
#define ERRCODE_SAVEPOINT_EXCEPTION MAKE_SQLSTATE('3','B','0','0','0')
|
||||
#define ERRCODE_S_E_INVALID_SPECIFICATION MAKE_SQLSTATE('3','B','0','0','1')
|
||||
|
||||
/* Class 3D - Invalid Catalog Name */
|
||||
#define ERRCODE_INVALID_CATALOG_NAME MAKE_SQLSTATE('3','D','0','0','0')
|
||||
|
||||
/* Class 3F - Invalid Schema Name */
|
||||
#define ERRCODE_INVALID_SCHEMA_NAME MAKE_SQLSTATE('3','F','0','0','0')
|
||||
|
||||
/* Class 40 - Transaction Rollback */
|
||||
#define ERRCODE_TRANSACTION_ROLLBACK MAKE_SQLSTATE('4','0','0','0','0')
|
||||
#define ERRCODE_T_R_INTEGRITY_CONSTRAINT_VIOLATION MAKE_SQLSTATE('4','0','0','0','2')
|
||||
#define ERRCODE_T_R_SERIALIZATION_FAILURE MAKE_SQLSTATE('4','0','0','0','1')
|
||||
#define ERRCODE_T_R_STATEMENT_COMPLETION_UNKNOWN MAKE_SQLSTATE('4','0','0','0','3')
|
||||
#define ERRCODE_T_R_DEADLOCK_DETECTED MAKE_SQLSTATE('4','0','P','0','1')
|
||||
|
||||
/* Class 42 - Syntax Error or Access Rule Violation */
|
||||
#define ERRCODE_SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION MAKE_SQLSTATE('4','2','0','0','0')
|
||||
#define ERRCODE_SYNTAX_ERROR MAKE_SQLSTATE('4','2','6','0','1')
|
||||
#define ERRCODE_INSUFFICIENT_PRIVILEGE MAKE_SQLSTATE('4','2','5','0','1')
|
||||
#define ERRCODE_CANNOT_COERCE MAKE_SQLSTATE('4','2','8','4','6')
|
||||
#define ERRCODE_GROUPING_ERROR MAKE_SQLSTATE('4','2','8','0','3')
|
||||
#define ERRCODE_WINDOWING_ERROR MAKE_SQLSTATE('4','2','P','2','0')
|
||||
#define ERRCODE_INVALID_RECURSION MAKE_SQLSTATE('4','2','P','1','9')
|
||||
#define ERRCODE_INVALID_FOREIGN_KEY MAKE_SQLSTATE('4','2','8','3','0')
|
||||
#define ERRCODE_INVALID_NAME MAKE_SQLSTATE('4','2','6','0','2')
|
||||
#define ERRCODE_NAME_TOO_LONG MAKE_SQLSTATE('4','2','6','2','2')
|
||||
#define ERRCODE_RESERVED_NAME MAKE_SQLSTATE('4','2','9','3','9')
|
||||
#define ERRCODE_DATATYPE_MISMATCH MAKE_SQLSTATE('4','2','8','0','4')
|
||||
#define ERRCODE_INDETERMINATE_DATATYPE MAKE_SQLSTATE('4','2','P','3','8')
|
||||
#define ERRCODE_COLLATION_MISMATCH MAKE_SQLSTATE('4','2','P','2','1')
|
||||
#define ERRCODE_INDETERMINATE_COLLATION MAKE_SQLSTATE('4','2','P','2','2')
|
||||
#define ERRCODE_WRONG_OBJECT_TYPE MAKE_SQLSTATE('4','2','8','0','9')
|
||||
#define ERRCODE_PARTITION_ERROR MAKE_SQLSTATE('4','2','P','2','3')
|
||||
#define ERRCODE_INVALID_ATTRIBUTE MAKE_SQLSTATE('4','2','P','2','4')
|
||||
#define ERRCODE_INVALID_AGG MAKE_SQLSTATE('4','2','P','2','5')
|
||||
#define ERRCODE_RESOURCE_POOL_ERROR MAKE_SQLSTATE('4','2','P','2','6')
|
||||
#define ERRCODE_PLAN_PARENT_NOT_FOUND MAKE_SQLSTATE('4','2','P','2','7')
|
||||
#define ERRCODE_MODIFY_CONFLICTS MAKE_SQLSTATE('4','2','P','2','8')
|
||||
#define ERRCODE_DISTRIBUTION_ERROR MAKE_SQLSTATE('4','2','P','2','9')
|
||||
#define ERRCODE_UNDEFINED_COLUMN MAKE_SQLSTATE('4','2','7','0','3')
|
||||
#define ERRCODE_UNDEFINED_CURSOR MAKE_SQLSTATE('3','4','0','0','1')
|
||||
#define ERRCODE_UNDEFINED_DATABASE MAKE_SQLSTATE('3','D','0','0','0')
|
||||
#define ERRCODE_UNDEFINED_FUNCTION MAKE_SQLSTATE('4','2','8','8','3')
|
||||
#define ERRCODE_UNDEFINED_PACKAGE MAKE_SQLSTATE('4','2','8','8','4')
|
||||
#define ERRCODE_UNDEFINED_PSTATEMENT MAKE_SQLSTATE('2','6','0','1','0')
|
||||
#define ERRCODE_UNDEFINED_SCHEMA MAKE_SQLSTATE('3','F','0','0','1')
|
||||
#define ERRCODE_UNDEFINED_TABLE MAKE_SQLSTATE('4','2','P','0','1')
|
||||
#define ERRCODE_UNDEFINED_PARAMETER MAKE_SQLSTATE('4','2','P','0','2')
|
||||
#define ERRCODE_UNDEFINED_OBJECT MAKE_SQLSTATE('4','2','7','0','4')
|
||||
#define ERRCODE_DUPLICATE_COLUMN MAKE_SQLSTATE('4','2','7','0','1')
|
||||
#define ERRCODE_DUPLICATE_CURSOR MAKE_SQLSTATE('4','2','P','0','3')
|
||||
#define ERRCODE_DUPLICATE_DATABASE MAKE_SQLSTATE('4','2','P','0','4')
|
||||
#define ERRCODE_DUPLICATE_FUNCTION MAKE_SQLSTATE('4','2','7','2','3')
|
||||
#define ERRCODE_DUPLICATE_PACKAGE MAKE_SQLSTATE('4','2','7','2','4')
|
||||
#define ERRCODE_DUPLICATE_PSTATEMENT MAKE_SQLSTATE('4','2','P','0','5')
|
||||
#define ERRCODE_DUPLICATE_SCHEMA MAKE_SQLSTATE('4','2','P','0','6')
|
||||
#define ERRCODE_DUPLICATE_TABLE MAKE_SQLSTATE('4','2','P','0','7')
|
||||
#define ERRCODE_DUPLICATE_ALIAS MAKE_SQLSTATE('4','2','7','1','2')
|
||||
#define ERRCODE_DUPLICATE_OBJECT MAKE_SQLSTATE('4','2','7','1','0')
|
||||
#define ERRCODE_AMBIGUOUS_COLUMN MAKE_SQLSTATE('4','2','7','0','2')
|
||||
#define ERRCODE_AMBIGUOUS_FUNCTION MAKE_SQLSTATE('4','2','7','2','5')
|
||||
#define ERRCODE_AMBIGUOUS_PARAMETER MAKE_SQLSTATE('4','2','P','0','8')
|
||||
#define ERRCODE_AMBIGUOUS_ALIAS MAKE_SQLSTATE('4','2','P','0','9')
|
||||
#define ERRCODE_INVALID_COLUMN_REFERENCE MAKE_SQLSTATE('4','2','P','1','0')
|
||||
#define ERRCODE_INVALID_COLUMN_DEFINITION MAKE_SQLSTATE('4','2','6','1','1')
|
||||
#define ERRCODE_INVALID_CURSOR_DEFINITION MAKE_SQLSTATE('4','2','P','1','1')
|
||||
#define ERRCODE_INVALID_DATABASE_DEFINITION MAKE_SQLSTATE('4','2','P','1','2')
|
||||
#define ERRCODE_INVALID_FUNCTION_DEFINITION MAKE_SQLSTATE('4','2','P','1','3')
|
||||
#define ERRCODE_INVALID_PSTATEMENT_DEFINITION MAKE_SQLSTATE('4','2','P','1','4')
|
||||
#define ERRCODE_INVALID_SCHEMA_DEFINITION MAKE_SQLSTATE('4','2','P','1','5')
|
||||
#define ERRCODE_INVALID_TABLE_DEFINITION MAKE_SQLSTATE('4','2','P','1','6')
|
||||
#define ERRCODE_INVALID_OBJECT_DEFINITION MAKE_SQLSTATE('4','2','P','1','7')
|
||||
#define ERRCODE_INVALID_TEMP_OBJECTS MAKE_SQLSTATE('4','2','P','1','8')
|
||||
#define ERRCODE_INVALID_PACKAGE_DEFINITION MAKE_SQLSTATE('4','2','P','1','9')
|
||||
#define ERRCODE_UNDEFINED_KEY MAKE_SQLSTATE('4','2','7','0','5')
|
||||
#define ERRCODE_DUPLICATE_KEY MAKE_SQLSTATE('4','2','7','1','1')
|
||||
#define ERRCODE_UNDEFINED_CL_COLUMN MAKE_SQLSTATE('4','2','7','1','3')
|
||||
#define ERRCODE_CL_FUNCTION_UPDATE MAKE_SQLSTATE('4','2','7','1','4')
|
||||
|
||||
/* Class 44 - WITH CHECK OPTION Violation */
|
||||
#define ERRCODE_WITH_CHECK_OPTION_VIOLATION MAKE_SQLSTATE('4','4','0','0','0')
|
||||
|
||||
/* Class 53 - Insufficient Resources */
|
||||
#define ERRCODE_INSUFFICIENT_RESOURCES MAKE_SQLSTATE('5','3','0','0','0')
|
||||
#define ERRCODE_DISK_FULL MAKE_SQLSTATE('5','3','1','0','0')
|
||||
#define ERRCODE_OUT_OF_MEMORY MAKE_SQLSTATE('5','3','2','0','0')
|
||||
#define ERRCODE_TOO_MANY_CONNECTIONS MAKE_SQLSTATE('5','3','3','0','0')
|
||||
#define ERRCODE_CONFIGURATION_LIMIT_EXCEEDED MAKE_SQLSTATE('5','3','4','0','0')
|
||||
#define ERRCODE_OUT_OF_BUFFER MAKE_SQLSTATE('5','3','5','0','0')
|
||||
|
||||
/* Class 54 - Program Limit Exceeded */
|
||||
#define ERRCODE_PROGRAM_LIMIT_EXCEEDED MAKE_SQLSTATE('5','4','0','0','0')
|
||||
#define ERRCODE_STATEMENT_TOO_COMPLEX MAKE_SQLSTATE('5','4','0','0','1')
|
||||
#define ERRCODE_TOO_MANY_COLUMNS MAKE_SQLSTATE('5','4','0','1','1')
|
||||
#define ERRCODE_TOO_MANY_ARGUMENTS MAKE_SQLSTATE('5','4','0','2','3')
|
||||
|
||||
/* Class 55 - Object Not In Prerequisite State */
|
||||
#define ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE MAKE_SQLSTATE('5','5','0','0','0')
|
||||
#define ERRCODE_OBJECT_IN_USE MAKE_SQLSTATE('5','5','0','0','6')
|
||||
#define ERRCODE_CANT_CHANGE_RUNTIME_PARAM MAKE_SQLSTATE('5','5','P','0','2')
|
||||
#define ERRCODE_LOCK_NOT_AVAILABLE MAKE_SQLSTATE('5','5','P','0','3')
|
||||
|
||||
/* Class 57 - Operator Intervention */
|
||||
#define ERRCODE_OPERATOR_INTERVENTION MAKE_SQLSTATE('5','7','0','0','0')
|
||||
#define ERRCODE_QUERY_CANCELED MAKE_SQLSTATE('5','7','0','1','4')
|
||||
#define ERRCODE_QUERY_INTERNAL_CANCEL MAKE_SQLSTATE('5','7','0','1','5')
|
||||
#define ERRCODE_ADMIN_SHUTDOWN MAKE_SQLSTATE('5','7','P','0','1')
|
||||
#define ERRCODE_CRASH_SHUTDOWN MAKE_SQLSTATE('5','7','P','0','2')
|
||||
#define ERRCODE_CANNOT_CONNECT_NOW MAKE_SQLSTATE('5','7','P','0','3')
|
||||
#define ERRCODE_DATABASE_DROPPED MAKE_SQLSTATE('5','7','P','0','4')
|
||||
#define ERRCODE_RU_STOP_QUERY MAKE_SQLSTATE('5','7','P','0','5')
|
||||
|
||||
/* Class 58 - System Error (errors external to PostgreSQL itself) */
|
||||
#define ERRCODE_SYSTEM_ERROR MAKE_SQLSTATE('5','8','0','0','0')
|
||||
#define ERRCODE_IO_ERROR MAKE_SQLSTATE('5','8','0','3','0')
|
||||
#define ERRCODE_UNDEFINED_FILE MAKE_SQLSTATE('5','8','P','0','1')
|
||||
#define ERRCODE_DUPLICATE_FILE MAKE_SQLSTATE('5','8','P','0','2')
|
||||
#define ERRCODE_FILE_READ_FAILED MAKE_SQLSTATE('5','8','P','0','3')
|
||||
#define ERRCODE_FILE_WRITE_FAILED MAKE_SQLSTATE('5','8','P','0','4')
|
||||
#define ERRCODE_INVALID_ENCRYPTED_COLUMN_DATA MAKE_SQLSTATE('2','2','0','0','Z')
|
||||
|
||||
/* Class 59 - Recycle Object Operation Error */
|
||||
#define ERRCODE_RBIN_LOCK_NOT_AVAILABLE MAKE_SQLSTATE('5','9','0','0','0')
|
||||
#define ERRCODE_RBIN_UNDEFINED_OBJECT MAKE_SQLSTATE('5','9','0','0','1')
|
||||
|
||||
/* Class F0 - Configuration File Error */
|
||||
#define ERRCODE_CONFIG_FILE_ERROR MAKE_SQLSTATE('F','0','0','0','0')
|
||||
#define ERRCODE_LOCK_FILE_EXISTS MAKE_SQLSTATE('F','0','0','0','1')
|
||||
|
||||
/* Class HV - Foreign Data Wrapper Error (SQL/MED) */
|
||||
#define ERRCODE_FDW_ERROR MAKE_SQLSTATE('H','V','0','0','0')
|
||||
#define ERRCODE_FDW_COLUMN_NAME_NOT_FOUND MAKE_SQLSTATE('H','V','0','0','5')
|
||||
#define ERRCODE_FDW_DYNAMIC_PARAMETER_VALUE_NEEDED MAKE_SQLSTATE('H','V','0','0','2')
|
||||
#define ERRCODE_FDW_FUNCTION_SEQUENCE_ERROR MAKE_SQLSTATE('H','V','0','1','0')
|
||||
#define ERRCODE_FDW_INCONSISTENT_DESCRIPTOR_INFORMATION MAKE_SQLSTATE('H','V','0','2','1')
|
||||
#define ERRCODE_FDW_INVALID_ATTRIBUTE_VALUE MAKE_SQLSTATE('H','V','0','2','4')
|
||||
#define ERRCODE_FDW_INVALID_COLUMN_NAME MAKE_SQLSTATE('H','V','0','0','7')
|
||||
#define ERRCODE_FDW_INVALID_COLUMN_NUMBER MAKE_SQLSTATE('H','V','0','0','8')
|
||||
#define ERRCODE_FDW_INVALID_DATA_TYPE MAKE_SQLSTATE('H','V','0','0','4')
|
||||
#define ERRCODE_FDW_INVALID_DATA_TYPE_DESCRIPTORS MAKE_SQLSTATE('H','V','0','0','6')
|
||||
#define ERRCODE_FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER MAKE_SQLSTATE('H','V','0','9','1')
|
||||
#define ERRCODE_FDW_INVALID_HANDLE MAKE_SQLSTATE('H','V','0','0','B')
|
||||
#define ERRCODE_FDW_INVALID_OPTION_INDEX MAKE_SQLSTATE('H','V','0','0','C')
|
||||
#define ERRCODE_FDW_INVALID_OPTION_NAME MAKE_SQLSTATE('H','V','0','0','D')
|
||||
#define ERRCODE_FDW_INVALID_OPTOIN_DATA MAKE_SQLSTATE('H','V','0','0','E')
|
||||
#define ERRCODE_FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH MAKE_SQLSTATE('H','V','0','9','0')
|
||||
#define ERRCODE_FDW_INVALID_STRING_FORMAT MAKE_SQLSTATE('H','V','0','0','A')
|
||||
#define ERRCODE_FDW_INVALID_USE_OF_NULL_POINTER MAKE_SQLSTATE('H','V','0','0','9')
|
||||
#define ERRCODE_FDW_TOO_MANY_HANDLES MAKE_SQLSTATE('H','V','0','1','4')
|
||||
#define ERRCODE_FDW_OUT_OF_MEMORY MAKE_SQLSTATE('H','V','0','0','1')
|
||||
#define ERRCODE_FDW_NO_SCHEMAS MAKE_SQLSTATE('H','V','0','0','P')
|
||||
#define ERRCODE_FDW_OPTION_NAME_NOT_FOUND MAKE_SQLSTATE('H','V','0','0','J')
|
||||
#define ERRCODE_FDW_REPLY_HANDLE MAKE_SQLSTATE('H','V','0','0','K')
|
||||
#define ERRCODE_FDW_SCHEMA_NOT_FOUND MAKE_SQLSTATE('H','V','0','0','Q')
|
||||
#define ERRCODE_FDW_TABLE_NOT_FOUND MAKE_SQLSTATE('H','V','0','0','R')
|
||||
#define ERRCODE_FDW_UNABLE_TO_CREATE_EXECUTION MAKE_SQLSTATE('H','V','0','0','L')
|
||||
#define ERRCODE_FDW_UNABLE_TO_CREATE_REPLY MAKE_SQLSTATE('H','V','0','0','M')
|
||||
#define ERRCODE_FDW_UNABLE_TO_ESTABLISH_CONNECTION MAKE_SQLSTATE('H','V','0','0','N')
|
||||
#define ERRCODE_FDW_INVALID_LIST_LENGTH MAKE_SQLSTATE('H','V','0','0','O')
|
||||
#define ERRCODE_FDW_INVALID_SERVER_TYPE MAKE_SQLSTATE('H','V','0','0','S')
|
||||
#define ERRCODE_FDW_OPERATION_NOT_SUPPORTED MAKE_SQLSTATE('H','V','0','2','5')
|
||||
#define ERRCODE_FDW_CROSS_STORAGE_ENGINE_TRANSACTION_NOT_SUPPORTED MAKE_SQLSTATE('H','V','0','2','6')
|
||||
#define ERRCODE_FDW_CROSS_STORAGE_ENGINE_QUERY_NOT_SUPPORTED MAKE_SQLSTATE('H','V','0','2','7')
|
||||
#define ERRCODE_FDW_UPDATE_INDEXED_FIELD_NOT_SUPPORTED MAKE_SQLSTATE('H','V','0','2','8')
|
||||
#define ERRCODE_FDW_TOO_MANY_INDEXES MAKE_SQLSTATE('H','V','0','2','9')
|
||||
#define ERRCODE_FDW_KEY_SIZE_EXCEEDS_MAX_ALLOWED MAKE_SQLSTATE('H','V','0','3','0')
|
||||
#define ERRCODE_FDW_DDL_IN_TRANSACTION_NOT_ALLOWED MAKE_SQLSTATE('H','V','0','3','1')
|
||||
#define ERRCODE_FDW_TOO_MANY_INDEX_COLUMNS MAKE_SQLSTATE('H','V','0','3','2')
|
||||
#define ERRCODE_FDW_INDEX_ON_NULLABLE_COLUMN_NOT_ALLOWED MAKE_SQLSTATE('H','V','0','3','3')
|
||||
#define ERRCODE_FDW_TOO_MANY_DDL_CHANGES_IN_TRANSACTION_NOT_ALLOWED MAKE_SQLSTATE('H','V','0','3','4')
|
||||
|
||||
/* Class P0 - PL/pgSQL Error */
|
||||
#define ERRCODE_PLPGSQL_ERROR MAKE_SQLSTATE('P','0','0','0','0')
|
||||
#define ERRCODE_RAISE_EXCEPTION MAKE_SQLSTATE('P','0','0','0','1')
|
||||
#define ERRCODE_NO_DATA_FOUND MAKE_SQLSTATE('P','0','0','0','2')
|
||||
#define ERRCODE_TOO_MANY_ROWS MAKE_SQLSTATE('P','0','0','0','3')
|
||||
#define ERRCODE_FORALL_NEED_DML MAKE_SQLSTATE('P','0','0','0','4')
|
||||
|
||||
/* Class XX - Internal Error */
|
||||
#define ERRCODE_INTERNAL_ERROR MAKE_SQLSTATE('X','X','0','0','0')
|
||||
#define ERRCODE_DATA_CORRUPTED MAKE_SQLSTATE('X','X','0','0','1')
|
||||
#define ERRCODE_INDEX_CORRUPTED MAKE_SQLSTATE('X','X','0','0','2')
|
||||
#define ERRCODE_STREAM_REMOTE_CLOSE_SOCKET MAKE_SQLSTATE('X','X','0','0','3')
|
||||
#define ERRCODE_UNRECOGNIZED_NODE_TYPE MAKE_SQLSTATE('X','X','0','0','4')
|
||||
#define ERRCODE_UNEXPECTED_NULL_VALUE MAKE_SQLSTATE('X','X','0','0','5')
|
||||
#define ERRCODE_UNEXPECTED_NODE_STATE MAKE_SQLSTATE('X','X','0','0','6')
|
||||
#define ERRCODE_NULL_JUNK_ATTRIBUTE MAKE_SQLSTATE('X','X','0','0','7')
|
||||
#define ERRCODE_OPTIMIZER_INCONSISTENT_STATE MAKE_SQLSTATE('X','X','0','0','8')
|
||||
#define ERRCODE_STREAM_DUPLICATE_QUERY_ID MAKE_SQLSTATE('X','X','0','0','9')
|
||||
#define ERRCODE_INVALID_BUFFER MAKE_SQLSTATE('X','X','0','1','0')
|
||||
#define ERRCODE_INVALID_BUFFER_REFERENCE MAKE_SQLSTATE('X','X','0','1','1')
|
||||
#define ERRCODE_NODE_ID_MISSMATCH MAKE_SQLSTATE('X','X','0','1','2')
|
||||
#define ERRCODE_CANNOT_MODIFY_XIDBASE MAKE_SQLSTATE('X','X','0','1','3')
|
||||
#define ERRCODE_UNEXPECTED_CHUNK_VALUE MAKE_SQLSTATE('X','X','0','1','4')
|
||||
#define ERRCODE_CN_RETRY_STUB MAKE_SQLSTATE('X','X','0','1','5')
|
||||
|
||||
/* Class CG - CodeGen Error */
|
||||
#define ERRCODE_CODEGEN_ERROR MAKE_SQLSTATE('C','G','0','0','0')
|
||||
#define ERRCODE_LOAD_IR_FUNCTION_FAILED MAKE_SQLSTATE('C','G','0','0','1')
|
||||
#define ERRCODE_LOAD_INTRINSIC_FUNCTION_FAILED MAKE_SQLSTATE('C','G','0','0','2')
|
||||
|
||||
/* Class YY - SQL Retry Error */
|
||||
#define ERRCODE_CONNECTION_RESET_BY_PEER MAKE_SQLSTATE('Y','Y','0','0','1')
|
||||
#define ERRCODE_STREAM_CONNECTION_RESET_BY_PEER MAKE_SQLSTATE('Y','Y','0','0','2')
|
||||
#define ERRCODE_LOCK_WAIT_TIMEOUT MAKE_SQLSTATE('Y','Y','0','0','3')
|
||||
#define ERRCODE_CONNECTION_TIMED_OUT MAKE_SQLSTATE('Y','Y','0','0','4')
|
||||
#define ERRCODE_SET_QUERY MAKE_SQLSTATE('Y','Y','0','0','5')
|
||||
#define ERRCODE_OUT_OF_LOGICAL_MEMORY MAKE_SQLSTATE('Y','Y','0','0','6')
|
||||
#define ERRCODE_SCTP_MEMORY_ALLOC MAKE_SQLSTATE('Y','Y','0','0','7')
|
||||
#define ERRCODE_SCTP_NO_DATA_IN_BUFFER MAKE_SQLSTATE('Y','Y','0','0','8')
|
||||
#define ERRCODE_SCTP_RELEASE_MEMORY_CLOSE MAKE_SQLSTATE('Y','Y','0','0','9')
|
||||
#define ERRCODE_SCTP_TCP_DISCONNECT MAKE_SQLSTATE('Y','Y','0','1','0')
|
||||
#define ERRCODE_SCTP_DISCONNECT MAKE_SQLSTATE('Y','Y','0','1','1')
|
||||
#define ERRCODE_SCTP_REMOTE_CLOSE MAKE_SQLSTATE('Y','Y','0','1','2')
|
||||
#define ERRCODE_SCTP_WAIT_POLL_UNKNOW MAKE_SQLSTATE('Y','Y','0','1','3')
|
||||
#define ERRCODE_SNAPSHOT_INVALID MAKE_SQLSTATE('Y','Y','0','1','4')
|
||||
#define ERRCODE_CONNECTION_RECEIVE_WRONG MAKE_SQLSTATE('Y','Y','0','1','5')
|
||||
#define ERRCODE_STREAM_CONCURRENT_UPDATE MAKE_SQLSTATE('Y','Y','0','1','6')
|
||||
|
||||
/* Class SI - SPI Interface Error */
|
||||
#define ERRCODE_SPI_ERROR MAKE_SQLSTATE('S','P','0','0','0')
|
||||
#define ERRCODE_SPI_CONNECTION_FAILURE MAKE_SQLSTATE('S','P','0','0','1')
|
||||
#define ERRCODE_SPI_FINISH_FAILURE MAKE_SQLSTATE('S','P','0','0','2')
|
||||
#define ERRCODE_SPI_PREPARE_FAILURE MAKE_SQLSTATE('S','P','0','0','3')
|
||||
#define ERRCODE_SPI_CURSOR_OPEN_FAILURE MAKE_SQLSTATE('S','P','0','0','4')
|
||||
#define ERRCODE_SPI_EXECUTE_FAILURE MAKE_SQLSTATE('S','P','0','0','5')
|
||||
#define ERRORCODE_SPI_IMPROPER_CALL MAKE_SQLSTATE('S','P','0','0','6')
|
||||
#define ERRCODE_PLDEBUGGER_ERROR MAKE_SQLSTATE('D','0','0','0','0')
|
||||
#define ERRCODE_DUPLICATE_BREAKPOINT MAKE_SQLSTATE('D','0','0','0','1')
|
||||
#define ERRCODE_FUNCTION_HASH_NOT_INITED MAKE_SQLSTATE('D','0','0','0','2')
|
||||
#define ERRCODE_BREAKPOINT_NOT_PRESENT MAKE_SQLSTATE('D','0','0','0','3')
|
||||
#define ERRCODE_TARGET_SERVER_ALREADY_ATTACHED MAKE_SQLSTATE('D','0','0','0','4')
|
||||
#define ERRCODE_TARGET_SERVER_NOT_ATTACHED MAKE_SQLSTATE('D','0','0','0','5')
|
||||
#define ERRCODE_DEBUG_SERVER_ALREADY_SYNC MAKE_SQLSTATE('D','0','0','0','6')
|
||||
#define ERRCODE_DEBUG_TARGET_SERVERS_NOT_IN_SYNC MAKE_SQLSTATE('D','0','0','0','7')
|
||||
#define ERRCODE_TARGET_SERVER_ALREADY_SYNC MAKE_SQLSTATE('D','0','0','0','8')
|
||||
#define ERRCODE_NONEXISTANT_VARIABLE MAKE_SQLSTATE('D','0','0','0','9')
|
||||
#define ERRCODE_INVALID_TARGET_SESSION_ID MAKE_SQLSTATE('D','0','0','1','0')
|
||||
#define ERRCODE_INVALID_OPERATION MAKE_SQLSTATE('D','0','0','1','1')
|
||||
#define ERRCODE_MAX_DEBUG_SESSIONS_REACHED MAKE_SQLSTATE('D','0','0','1','2')
|
||||
#define ERRCODE_MAX_BREAKPOINTS_REACHED MAKE_SQLSTATE('D','0','0','1','3')
|
||||
#define ERRCODE_INITIALIZE_FAILED MAKE_SQLSTATE('D','0','0','1','4')
|
||||
#define ERRCODE_RBTREE_INVALID_NODE_STATE MAKE_SQLSTATE('R','B','0','0','1')
|
||||
#define ERRCODE_RBTREE_INVALID_ITERATOR_ORDER MAKE_SQLSTATE('R','B','0','0','2')
|
||||
#define ERRCODE_DEBUG MAKE_SQLSTATE('D','B','0','0','1')
|
||||
#define ERRCODE_LOG MAKE_SQLSTATE('D','B','0','1','0')
|
||||
#define ERRCODE_OPERATE_FAILED MAKE_SQLSTATE('O','P','0','0','1')
|
||||
#define ERRCODE_OPERATE_RESULT_NOT_EXPECTED MAKE_SQLSTATE('O','P','0','0','2')
|
||||
#define ERRCODE_OPERATE_NOT_SUPPORTED MAKE_SQLSTATE('O','P','0','0','3')
|
||||
#define ERRCODE_OPERATE_INVALID_PARAM MAKE_SQLSTATE('O','P','0','A','3')
|
||||
#define ERRCODE_INDEX_OPERATOR_MISMATCH MAKE_SQLSTATE('O','P','0','0','4')
|
||||
#define ERRCODE_NO_FUNCTION_PROVIDED MAKE_SQLSTATE('O','P','0','0','5')
|
||||
#define ERRCODE_LOGICAL_DECODE_ERROR MAKE_SQLSTATE('L','L','0','0','1')
|
||||
#define ERRCODE_RELFILENODEMAP MAKE_SQLSTATE('L','L','0','0','2')
|
||||
|
||||
/* Class TS - Timeseries Error */
|
||||
#define ERRCODE_TS_COMMON_ERROR MAKE_SQLSTATE('T','S','0','0','0')
|
||||
#define ERRCODE_TS_KEYTYPE_MISMATCH MAKE_SQLSTATE('T','S','0','0','1')
|
||||
|
||||
/* Class SE - Security Error */
|
||||
#define ERRCODE_DUPLICATE_POLICY MAKE_SQLSTATE('4','2','7','1','4')
|
||||
#define ERRCODE_DUPLICATE_LABEL MAKE_SQLSTATE('4','2','7','1','5')
|
||||
#define ERRCODE_INVALID_AUDIT_LOG MAKE_SQLSTATE('S','E','0','0','1')
|
161
windows/build/win32/libpq/include/libpqdll.def
Normal file
161
windows/build/win32/libpq/include/libpqdll.def
Normal file
@ -0,0 +1,161 @@
|
||||
; DEF file for MS VC++
|
||||
LIBRARY LIBPQ
|
||||
EXPORTS
|
||||
PQconnectdb @ 1
|
||||
PQsetdbLogin @ 2
|
||||
PQconndefaults @ 3
|
||||
PQfinish @ 4
|
||||
PQreset @ 5
|
||||
PQrequestCancel @ 6
|
||||
PQdb @ 7
|
||||
PQuser @ 8
|
||||
PQpass @ 9
|
||||
PQhost @ 10
|
||||
PQport @ 11
|
||||
PQtty @ 12
|
||||
PQoptions @ 13
|
||||
PQstatus @ 14
|
||||
PQerrorMessage @ 15
|
||||
PQsocket @ 16
|
||||
PQbackendPID @ 17
|
||||
PQtrace @ 18
|
||||
PQuntrace @ 19
|
||||
PQsetNoticeProcessor @ 20
|
||||
PQexec @ 21
|
||||
PQnotifies @ 22
|
||||
PQsendQuery @ 23
|
||||
PQgetResult @ 24
|
||||
PQisBusy @ 25
|
||||
PQconsumeInput @ 26
|
||||
PQgetline @ 27
|
||||
PQputline @ 28
|
||||
PQgetlineAsync @ 29
|
||||
PQputnbytes @ 30
|
||||
PQendcopy @ 31
|
||||
PQfn @ 32
|
||||
PQresultStatus @ 33
|
||||
PQntuples @ 34
|
||||
PQnfields @ 35
|
||||
PQbinaryTuples @ 36
|
||||
PQfname @ 37
|
||||
PQfnumber @ 38
|
||||
PQftype @ 39
|
||||
PQfsize @ 40
|
||||
PQfmod @ 41
|
||||
PQcmdStatus @ 42
|
||||
PQoidStatus @ 43
|
||||
PQcmdTuples @ 44
|
||||
PQgetvalue @ 45
|
||||
PQgetlength @ 46
|
||||
PQgetisnull @ 47
|
||||
PQclear @ 48
|
||||
PQmakeEmptyPGresult @ 49
|
||||
PQprint @ 50
|
||||
PQdisplayTuples @ 51
|
||||
PQprintTuples @ 52
|
||||
lo_open @ 53
|
||||
lo_close @ 54
|
||||
lo_read @ 55
|
||||
lo_write @ 56
|
||||
lo_lseek @ 57
|
||||
lo_creat @ 58
|
||||
lo_tell @ 59
|
||||
lo_unlink @ 60
|
||||
lo_import @ 61
|
||||
lo_export @ 62
|
||||
pgresStatus @ 63
|
||||
PQmblen @ 64
|
||||
PQresultErrorMessage @ 65
|
||||
PQresStatus @ 66
|
||||
termPQExpBuffer @ 67
|
||||
appendPQExpBufferChar @ 68
|
||||
initPQExpBuffer @ 69
|
||||
resetPQExpBuffer @ 70
|
||||
PQoidValue @ 71
|
||||
PQclientEncoding @ 72
|
||||
PQenv2encoding @ 73
|
||||
appendBinaryPQExpBuffer @ 74
|
||||
appendPQExpBufferStr @ 75
|
||||
destroyPQExpBuffer @ 76
|
||||
createPQExpBuffer @ 77
|
||||
PQconninfoFree @ 78
|
||||
PQconnectPoll @ 79
|
||||
PQconnectStart @ 80
|
||||
PQflush @ 81
|
||||
PQisnonblocking @ 82
|
||||
PQresetPoll @ 83
|
||||
PQresetStart @ 84
|
||||
PQsetClientEncoding @ 85
|
||||
PQsetnonblocking @ 86
|
||||
PQfreeNotify @ 87
|
||||
PQescapeString @ 88
|
||||
PQescapeBytea @ 89
|
||||
printfPQExpBuffer @ 90
|
||||
appendPQExpBuffer @ 91
|
||||
PQexecParamsBatch @ 92
|
||||
PQexecPreparedBatch @ 93
|
||||
PQunescapeBytea @ 94
|
||||
PQfreemem @ 95
|
||||
PQtransactionStatus @ 96
|
||||
PQparameterStatus @ 97
|
||||
PQprotocolVersion @ 98
|
||||
PQsetErrorVerbosity @ 99
|
||||
PQsetNoticeReceiver @ 100
|
||||
PQexecParams @ 101
|
||||
PQsendQueryParams @ 102
|
||||
PQputCopyData @ 103
|
||||
PQputCopyEnd @ 104
|
||||
PQgetCopyData @ 105
|
||||
PQresultErrorField @ 106
|
||||
PQftable @ 107
|
||||
PQftablecol @ 108
|
||||
PQfformat @ 109
|
||||
PQexecPrepared @ 110
|
||||
PQsendQueryPrepared @ 111
|
||||
PQdsplen @ 112
|
||||
PQserverVersion @ 113
|
||||
PQgetssl @ 114
|
||||
;pqsignal @ 115
|
||||
PQprepare @ 116
|
||||
PQsendPrepare @ 117
|
||||
PQgetCancel @ 118
|
||||
PQfreeCancel @ 119
|
||||
PQcancel @ 120
|
||||
lo_create @ 121
|
||||
PQinitSSL @ 122
|
||||
PQregisterThreadLock @ 123
|
||||
PQescapeStringConn @ 124
|
||||
PQescapeByteaConn @ 125
|
||||
PQencryptPassword @ 126
|
||||
PQisthreadsafe @ 127
|
||||
enlargePQExpBuffer @ 128
|
||||
PQnparams @ 129
|
||||
PQparamtype @ 130
|
||||
PQdescribePrepared @ 131
|
||||
PQdescribePortal @ 132
|
||||
PQsendDescribePrepared @ 133
|
||||
PQsendDescribePortal @ 134
|
||||
lo_truncate @ 135
|
||||
PQconnectionUsedPassword @ 136
|
||||
PQconnectionNeedsPassword @ 137
|
||||
lo_import_with_oid @ 138
|
||||
PQcopyResult @ 139
|
||||
PQsetResultAttrs @ 140
|
||||
PQsetvalue @ 141
|
||||
PQresultAlloc @ 142
|
||||
PQregisterEventProc @ 143
|
||||
PQinstanceData @ 144
|
||||
PQsetInstanceData @ 145
|
||||
PQresultInstanceData @ 146
|
||||
PQresultSetInstanceData @ 147
|
||||
PQfireResultCreateEvents @ 148
|
||||
PQconninfoParse @ 149
|
||||
PQinitOpenSSL @ 150
|
||||
PQescapeLiteral @ 151
|
||||
PQescapeIdentifier @ 152
|
||||
PQconnectdbParams @ 153
|
||||
PQconnectStartParams @ 154
|
||||
PQping @ 155
|
||||
PQpingParams @ 156
|
||||
PQlibVersion @ 157
|
||||
PQsetSingleRowMode @ 158
|
912
windows/build/win32/libpq/include/pg_config.h
Normal file
912
windows/build/win32/libpq/include/pg_config.h
Normal file
@ -0,0 +1,912 @@
|
||||
/* src/include/pg_config.h. Generated from pg_config.h.in by configure. */
|
||||
/* src/include/pg_config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to the type of arg 1 of 'accept' */
|
||||
#define ACCEPT_TYPE_ARG1 unsigned int
|
||||
|
||||
/* Define to the type of arg 2 of 'accept' */
|
||||
#define ACCEPT_TYPE_ARG2 struct sockaddr *
|
||||
|
||||
/* Define to the type of arg 3 of 'accept' */
|
||||
#define ACCEPT_TYPE_ARG3 socklen_t
|
||||
|
||||
/* Define to the return type of 'accept' */
|
||||
#define ACCEPT_TYPE_RETURN unsigned int PASCAL
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
||||
|
||||
/* The normal alignment of `double', in bytes. */
|
||||
#define ALIGNOF_DOUBLE 8
|
||||
|
||||
/* The normal alignment of `int', in bytes. */
|
||||
#define ALIGNOF_INT 4
|
||||
|
||||
/* The normal alignment of `long', in bytes. */
|
||||
#define ALIGNOF_LONG 4
|
||||
|
||||
/* The normal alignment of `long long int', in bytes. */
|
||||
#define ALIGNOF_LONG_LONG_INT 8
|
||||
|
||||
/* The normal alignment of `short', in bytes. */
|
||||
#define ALIGNOF_SHORT 2
|
||||
|
||||
/* Size of a disk block --- this also limits the size of a tuple. You can set
|
||||
it bigger if you need bigger tuples (although TOAST should reduce the need
|
||||
to have large tuples, since fields can be spread across multiple tuples).
|
||||
BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ is
|
||||
currently 2^15 (32768). This is determined by the 15-bit widths of the
|
||||
lp_off and lp_len fields in ItemIdData (see include/storage/item/itemid.h).
|
||||
Changing BLCKSZ requires an initdb. */
|
||||
#define BLCKSZ 8192
|
||||
|
||||
/* Define to the default TCP port number on which the server listens and to
|
||||
which clients will try to connect. This can be overridden at run-time, but
|
||||
it's convenient if your clients have the right default compiled in.
|
||||
(--with-pgport=PORTNUM) */
|
||||
#define DEF_PGPORT 5432
|
||||
|
||||
/* Define to the default TCP port number as a string constant. */
|
||||
#define DEF_PGPORT_STR "5432"
|
||||
|
||||
/* Define to build with GSSAPI support. (--with-gssapi) */
|
||||
//#define ENABLE_GSS 1
|
||||
|
||||
/* Define to build with PYTHON support. (--with-python) */
|
||||
/* #undef ENABLE_PYTHON2 */
|
||||
/* #undef ENABLE_PYTHON3 */
|
||||
|
||||
/* Define to 1 if you want National Language Support. (--enable-nls) */
|
||||
/* #undef ENABLE_NLS */
|
||||
|
||||
/* Define to 1 if you want to generate gauss product as single node. (--enable-privategauss) */
|
||||
/* #undef ENABLE_PRIVATEGAUSS */
|
||||
|
||||
/* Define to 1 if you want to generate gauss product as multiple nodes. (--enable-multiple-nodes) */
|
||||
/* #undef ENABLE_MULTIPLE_NODES */
|
||||
|
||||
/* Define to 1 if you want MOT support. (--enable-mot).
|
||||
Supported only in single_node mode, not supported with (--enable-multiple-nodes) */
|
||||
/* #undef ENABLE_MOT */
|
||||
|
||||
/* Define to 1 if you want to check memory. (--enable-memory-check) */
|
||||
/* #undef ENABLE_MEMORY_CHECK */
|
||||
|
||||
/* Define to 1 if you want to check thread. (--enable-thread-check) */
|
||||
/* #undef ENABLE_THREAD_CHECK */
|
||||
|
||||
/* Define to 1 if you want to use default gcc. (--enable-default-gcc) */
|
||||
/* #undef ENABLE_DEFAULT_GCC */
|
||||
|
||||
/* Define to 1 to build client libraries as thread-safe code.
|
||||
(--enable-thread-safety) */
|
||||
#define ENABLE_THREAD_SAFETY 1
|
||||
|
||||
/* Define to nothing if C supports flexible array members, and to 1 if it does
|
||||
not. That way, with a declaration like `struct s { int n; double
|
||||
d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
|
||||
compilers. When computing the size of such an object, don't use 'sizeof
|
||||
(struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
|
||||
instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
|
||||
MSVC and with C++ compilers. */
|
||||
#define FLEXIBLE_ARRAY_MEMBER /**/
|
||||
|
||||
/* float4 values are passed by value if 'true', by reference if 'false' */
|
||||
#define FLOAT4PASSBYVAL true
|
||||
|
||||
/* float8, int8, and related values are passed by value if 'true', by
|
||||
reference if 'false' */
|
||||
#define FLOAT8PASSBYVAL false
|
||||
|
||||
/* Define to 1 if getpwuid_r() takes a 5th argument. */
|
||||
/* #undef GETPWUID_R_5ARG */
|
||||
|
||||
/* Define to 1 if gettimeofday() takes only 1 argument. */
|
||||
/* #undef GETTIMEOFDAY_1ARG */
|
||||
|
||||
#ifdef GETTIMEOFDAY_1ARG
|
||||
# define gettimeofday(a,b) gettimeofday(a)
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `append_history' function. */
|
||||
/* #undef HAVE_APPEND_HISTORY */
|
||||
|
||||
/* Define to 1 if you have the `cbrt' function. */
|
||||
#define HAVE_CBRT 1
|
||||
|
||||
/* Define to 1 if you have the `class' function. */
|
||||
/* #undef HAVE_CLASS */
|
||||
|
||||
/* Define to 1 if you have the <crtdefs.h> header file. */
|
||||
/* #undef HAVE_CRTDEFS_H */
|
||||
|
||||
/* Define to 1 if you have the `crypt' function. */
|
||||
/* #undef HAVE_CRYPT */
|
||||
|
||||
/* Define to 1 if you have the <crypt.h> header file. */
|
||||
/* #undef HAVE_CRYPT_H */
|
||||
|
||||
/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_FDATASYNC 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_F_FULLFSYNC 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `posix_fadvise', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_POSIX_FADVISE 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_SNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_STRLCAT 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_STRLCPY 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_SYS_SIGLIST 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_VSNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the <dld.h> header file. */
|
||||
/* #undef HAVE_DLD_H */
|
||||
|
||||
/* Define to 1 if you have the `dlopen' function. */
|
||||
#define HAVE_DLOPEN 1
|
||||
|
||||
/* Define to 1 if you have the <editline/history.h> header file. */
|
||||
/* #undef HAVE_EDITLINE_HISTORY_H */
|
||||
|
||||
/* Define to 1 if you have the <editline/readline.h> header file. */
|
||||
/* #undef HAVE_EDITLINE_READLINE_H */
|
||||
|
||||
/* Define to 1 if you have the `fdatasync' function. */
|
||||
/* #undef HAVE_FDATASYNC */
|
||||
|
||||
/* Define to 1 if you have the `fls' function. */
|
||||
/* #undef HAVE_FLS */
|
||||
|
||||
/* Define to 1 if you have the `fpclass' function. */
|
||||
/* #undef HAVE_FPCLASS */
|
||||
|
||||
/* Define to 1 if you have the `fp_class' function. */
|
||||
/* #undef HAVE_FP_CLASS */
|
||||
|
||||
/* Define to 1 if you have the `fp_class_d' function. */
|
||||
/* #undef HAVE_FP_CLASS_D */
|
||||
|
||||
/* Define to 1 if you have the <fp_class.h> header file. */
|
||||
/* #undef HAVE_FP_CLASS_H */
|
||||
|
||||
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
|
||||
#define HAVE_FSEEKO 1
|
||||
|
||||
/* Define to 1 if your compiler understands __func__. */
|
||||
#define HAVE_FUNCNAME__FUNC 1
|
||||
|
||||
/* Define to 1 if your compiler understands __FUNCTION__. */
|
||||
/* #undef HAVE_FUNCNAME__FUNCTION */
|
||||
|
||||
/* Define to 1 if you have __sync_lock_test_and_set(int *) and friends. */
|
||||
#define HAVE_GCC_INT_ATOMICS 1
|
||||
|
||||
/* Define to 1 if you have the `getaddrinfo' function. */
|
||||
/* #undef HAVE_GETADDRINFO */
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname_r' function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R */
|
||||
|
||||
/* Define to 1 if you have the `getifaddrs' function. */
|
||||
/* #undef HAVE_GETIFADDRS */
|
||||
|
||||
/* Define to 1 if you have the `getopt' function. */
|
||||
#define HAVE_GETOPT 1
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#define HAVE_GETOPT_H 1
|
||||
|
||||
/* Define to 1 if you have the `getopt_long' function. */
|
||||
#define HAVE_GETOPT_LONG 1
|
||||
|
||||
/* Define to 1 if you have the `getpeereid' function. */
|
||||
#define HAVE_GETPEEREID 1
|
||||
|
||||
/* Define to 1 if you have the `getpeerucred' function. */
|
||||
/* #undef HAVE_GETPEERUCRED */
|
||||
|
||||
/* Define to 1 if you have the `getpwuid_r' function. */
|
||||
/* #undef HAVE_GETPWUID_R */
|
||||
|
||||
/* Define to 1 if you have the `getrlimit' function. */
|
||||
/* #undef HAVE_GETRLIMIT */
|
||||
|
||||
/* Define to 1 if you have the `getrusage' function. */
|
||||
/* #undef HAVE_GETRUSAGE */
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
|
||||
/* #undef HAVE_GSSAPI_GSSAPI_H */
|
||||
|
||||
/* Define to 1 if you have the <gssapi.h> header file. */
|
||||
/* #undef HAVE_GSSAPI_H */
|
||||
|
||||
/* Define to 1 if you have the <history.h> header file. */
|
||||
/* #undef HAVE_HISTORY_H */
|
||||
|
||||
/* Define to 1 if you have the `history_truncate_file' function. */
|
||||
/* #undef HAVE_HISTORY_TRUNCATE_FILE */
|
||||
|
||||
/* Define to 1 if you have the <ieeefp.h> header file. */
|
||||
/* #undef HAVE_IEEEFP_H */
|
||||
|
||||
/* Define to 1 if you have the <ifaddrs.h> header file. */
|
||||
/* #undef HAVE_IFADDRS_H */
|
||||
|
||||
/* Define to 1 if you have the `inet_aton' function. */
|
||||
/* #undef HAVE_INET_ATON */
|
||||
|
||||
/* Define to 1 if the system has the type `int64'. */
|
||||
/* #undef HAVE_INT64 */
|
||||
|
||||
/* Define to 1 if the system has the type `int8'. */
|
||||
/* #undef HAVE_INT8 */
|
||||
|
||||
/* Define to 1 if the system has the type `intptr_t'. */
|
||||
#define HAVE_INTPTR_T 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the global variable 'int opterr'. */
|
||||
#define HAVE_INT_OPTERR 1
|
||||
|
||||
/* Define to 1 if you have the global variable 'int optreset'. */
|
||||
/* #undef HAVE_INT_OPTRESET */
|
||||
|
||||
/* Define to 1 if you have the global variable 'int timezone'. */
|
||||
#define HAVE_INT_TIMEZONE /**/
|
||||
|
||||
/* Define to 1 if you have support for IPv6. */
|
||||
#define HAVE_IPV6 1
|
||||
|
||||
/* Define to 1 if you have isinf(). */
|
||||
#define HAVE_ISINF 1
|
||||
|
||||
/* Define to 1 if `e_data' is member of `krb5_error'. */
|
||||
/* #undef HAVE_KRB5_ERROR_E_DATA */
|
||||
|
||||
/* Define to 1 if `text.data' is member of `krb5_error'. */
|
||||
/* #undef HAVE_KRB5_ERROR_TEXT_DATA */
|
||||
|
||||
/* Define to 1 if you have krb5_free_unparsed_name. */
|
||||
/* #undef HAVE_KRB5_FREE_UNPARSED_NAME */
|
||||
|
||||
/* Define to 1 if `client' is member of `krb5_ticket'. */
|
||||
/* #undef HAVE_KRB5_TICKET_CLIENT */
|
||||
|
||||
/* Define to 1 if `enc_part2' is member of `krb5_ticket'. */
|
||||
/* #undef HAVE_KRB5_TICKET_ENC_PART2 */
|
||||
|
||||
/* Define to 1 if you have the <langinfo.h> header file. */
|
||||
/* #undef HAVE_LANGINFO_H */
|
||||
|
||||
/* Define to 1 if you have the <ldap.h> header file. */
|
||||
/* #undef HAVE_LDAP_H */
|
||||
|
||||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||
/* #undef HAVE_LIBCRYPTO */
|
||||
|
||||
/* Define to 1 if you have the `ldap' library (-lldap). */
|
||||
/* #undef HAVE_LIBLDAP */
|
||||
|
||||
/* Define to 1 if you have the `ldap_r' library (-lldap_r). */
|
||||
/* #undef HAVE_LIBLDAP_R */
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#define HAVE_LIBM 1
|
||||
|
||||
/* Define to 1 if you have the `pam' library (-lpam). */
|
||||
/* #undef HAVE_LIBPAM */
|
||||
|
||||
/* Define if you have a function readline library */
|
||||
/* #undef HAVE_LIBREADLINE */
|
||||
|
||||
/* Define to 1 if you have the `selinux' library (-lselinux). */
|
||||
/* #undef HAVE_LIBSELINUX */
|
||||
|
||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||
/* #undef HAVE_LIBSSL */
|
||||
|
||||
/* Define to 1 if you have the `wldap32' library (-lwldap32). */
|
||||
/* #undef HAVE_LIBWLDAP32 */
|
||||
|
||||
/* Define to 1 if you have the `xml2' library (-lxml2). */
|
||||
/* #undef HAVE_LIBXML2 */
|
||||
|
||||
/* Define to 1 if you have the `xslt' library (-lxslt). */
|
||||
/* #undef HAVE_LIBXSLT */
|
||||
|
||||
/* Define to 1 if you have the `z' library (-lz). */
|
||||
/* #undef HAVE_LIBZ */
|
||||
|
||||
/* Define to 1 if constants of type 'long long int' should have the suffix LL.
|
||||
*/
|
||||
#define HAVE_LL_CONSTANTS 1
|
||||
|
||||
/* Define to 1 if the system has the type `locale_t'. */
|
||||
#define HAVE_LOCALE_T 1
|
||||
|
||||
/* Define to 1 if `long int' works and is 64 bits. */
|
||||
/* #undef HAVE_LONG_INT_64 */
|
||||
|
||||
/* Define to 1 if the system has the type `long long int'. */
|
||||
#define HAVE_LONG_LONG_INT 1
|
||||
|
||||
/* Define to 1 if `long long int' works and is 64 bits. */
|
||||
#define HAVE_LONG_LONG_INT_64 1
|
||||
|
||||
/* Define to 1 if you have the `mbstowcs_l' function. */
|
||||
/* #undef HAVE_MBSTOWCS_L */
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */
|
||||
/* #undef HAVE_MINIDUMP_TYPE */
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
/* #undef HAVE_NETINET_TCP_H */
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
/* #undef HAVE_NET_IF_H */
|
||||
|
||||
/* Define to 1 if you have the <ossp/uuid.h> header file. */
|
||||
/* #undef HAVE_OSSP_UUID_H */
|
||||
|
||||
/* Define to 1 if you have the <pam/pam_appl.h> header file. */
|
||||
/* #undef HAVE_PAM_PAM_APPL_H */
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
/* #undef HAVE_POLL */
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
/* #undef HAVE_POLL_H */
|
||||
|
||||
/* Define to 1 if you have the `posix_fadvise' function. */
|
||||
/* #undef HAVE_POSIX_FADVISE */
|
||||
|
||||
/* Define to 1 if you have the POSIX signal interface. */
|
||||
/* #undef HAVE_POSIX_SIGNALS */
|
||||
|
||||
/* Define to 1 if the assembler supports PPC's LWARX mutex hint bit. */
|
||||
/* #undef HAVE_PPC_LWARX_MUTEX_HINT */
|
||||
|
||||
/* Define to 1 if you have the `pstat' function. */
|
||||
/* #undef HAVE_PSTAT */
|
||||
|
||||
/* Define to 1 if the PS_STRINGS thing exists. */
|
||||
/* #undef HAVE_PS_STRINGS */
|
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */
|
||||
/* #undef HAVE_PTHREAD */
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#define HAVE_PWD_H 1
|
||||
|
||||
/* Define to 1 if you have the `random' function. */
|
||||
/* #undef HAVE_RANDOM */
|
||||
|
||||
/* Define to 1 if you have the <readline.h> header file. */
|
||||
/* #undef HAVE_READLINE_H */
|
||||
|
||||
/* Define to 1 if you have the <readline/history.h> header file. */
|
||||
/* #undef HAVE_READLINE_HISTORY_H */
|
||||
|
||||
/* Define to 1 if you have the <readline/readline.h> header file. */
|
||||
/* #undef HAVE_READLINE_READLINE_H */
|
||||
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
/* #undef HAVE_READLINK */
|
||||
|
||||
/* Define to 1 if you have the `rint' function. */
|
||||
#define HAVE_RINT 1
|
||||
|
||||
/* Define to 1 if you have the global variable
|
||||
'rl_completion_append_character'. */
|
||||
/* #undef HAVE_RL_COMPLETION_APPEND_CHARACTER */
|
||||
|
||||
/* Define to 1 if you have the `rl_completion_matches' function. */
|
||||
/* #undef HAVE_RL_COMPLETION_MATCHES */
|
||||
|
||||
/* Define to 1 if you have the `rl_filename_completion_function' function. */
|
||||
/* #undef HAVE_RL_FILENAME_COMPLETION_FUNCTION */
|
||||
|
||||
/* Define to 1 if you have the <security/pam_appl.h> header file. */
|
||||
/* #undef HAVE_SECURITY_PAM_APPL_H */
|
||||
|
||||
/* Define to 1 if you have the `setproctitle' function. */
|
||||
/* #undef HAVE_SETPROCTITLE */
|
||||
|
||||
/* Define to 1 if you have the `setsid' function. */
|
||||
/* #undef HAVE_SETSID */
|
||||
|
||||
/* Define to 1 if you have the `sigprocmask' function. */
|
||||
/* #undef HAVE_SIGPROCMASK */
|
||||
|
||||
/* Define to 1 if you have sigsetjmp(). */
|
||||
/* #undef HAVE_SIGSETJMP */
|
||||
|
||||
/* Define to 1 if the system has the type `sig_atomic_t'. */
|
||||
#define HAVE_SIG_ATOMIC_T 1
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
/* #undef HAVE_SNPRINTF */
|
||||
|
||||
/* Define to 1 if you have spinlocks. */
|
||||
#define HAVE_SPINLOCKS 1
|
||||
|
||||
/* Define to 1 if you have the `srandom' function. */
|
||||
/* #undef HAVE_SRANDOM */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the `strerror_r' function. */
|
||||
/* #undef HAVE_STRERROR_R */
|
||||
|
||||
/* Define to 1 if cpp supports the ANSI # stringizing operator. */
|
||||
#define HAVE_STRINGIZE 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
// #define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
/* #undef HAVE_STRLCAT */
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
/* #undef HAVE_STRLCPY */
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#define HAVE_STRTOLL 1
|
||||
|
||||
/* Define to 1 if you have the `strtoq' function. */
|
||||
/* #undef HAVE_STRTOQ */
|
||||
|
||||
/* Define to 1 if you have the `strtoull' function. */
|
||||
#define HAVE_STRTOULL 1
|
||||
|
||||
/* Define to 1 if you have the `strtouq' function. */
|
||||
/* #undef HAVE_STRTOUQ */
|
||||
|
||||
/* Define to 1 if the system has the type `struct addrinfo'. */
|
||||
#define HAVE_STRUCT_ADDRINFO 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct cmsgcred'. */
|
||||
/* #undef HAVE_STRUCT_CMSGCRED */
|
||||
|
||||
/* Define to 1 if the system has the type `struct option'. */
|
||||
#define HAVE_STRUCT_OPTION 1
|
||||
|
||||
/* Define to 1 if `sa_len' is member of `struct sockaddr'. */
|
||||
/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
|
||||
|
||||
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
|
||||
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
|
||||
|
||||
/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */
|
||||
#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
|
||||
|
||||
/* Define to 1 if `ss_len' is member of `struct sockaddr_storage'. */
|
||||
/* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN */
|
||||
|
||||
/* Define to 1 if `__ss_family' is member of `struct sockaddr_storage'. */
|
||||
/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */
|
||||
|
||||
/* Define to 1 if `__ss_len' is member of `struct sockaddr_storage'. */
|
||||
/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */
|
||||
|
||||
/* Define to 1 if `tm_zone' is member of `struct tm'. */
|
||||
/* #undef HAVE_STRUCT_TM_TM_ZONE */
|
||||
|
||||
/* Define to 1 if you have the `symlink' function. */
|
||||
#define HAVE_SYMLINK 1
|
||||
|
||||
/* Define to 1 if you have the `sync_file_range' function. */
|
||||
/* #undef HAVE_SYNC_FILE_RANGE */
|
||||
|
||||
/* Define to 1 if you have the syslog interface. */
|
||||
/* #undef HAVE_SYSLOG */
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
/* #undef HAVE_SYS_IOCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ipc.h> header file. */
|
||||
/* #undef HAVE_SYS_IPC_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
/* #undef HAVE_SYS_POLL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/pstat.h> header file. */
|
||||
/* #undef HAVE_SYS_PSTAT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
/* #undef HAVE_SYS_RESOURCE_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
/* #undef HAVE_SYS_SELECT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/sem.h> header file. */
|
||||
/* #undef HAVE_SYS_SEM_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/shm.h> header file. */
|
||||
/* #undef HAVE_SYS_SHM_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
/* #undef HAVE_SYS_SOCKIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/tas.h> header file. */
|
||||
/* #undef HAVE_SYS_TAS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/ucred.h> header file. */
|
||||
/* #undef HAVE_SYS_UCRED_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||
/* #undef HAVE_SYS_UN_H */
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
/* #undef HAVE_TERMIOS_H */
|
||||
|
||||
/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
|
||||
`HAVE_STRUCT_TM_TM_ZONE' instead. */
|
||||
/* #undef HAVE_TM_ZONE */
|
||||
|
||||
/* Define to 1 if you have the `towlower' function. */
|
||||
#define HAVE_TOWLOWER 1
|
||||
|
||||
/* Define to 1 if you have the external array `tzname'. */
|
||||
#define HAVE_TZNAME 1
|
||||
|
||||
/* Define to 1 if you have the <ucred.h> header file. */
|
||||
/* #undef HAVE_UCRED_H */
|
||||
|
||||
/* Define to 1 if the system has the type `uint64'. */
|
||||
/* #undef HAVE_UINT64 */
|
||||
|
||||
/* Define to 1 if the system has the type `uint8'. */
|
||||
/* #undef HAVE_UINT8 */
|
||||
|
||||
/* Define to 1 if the system has the type `uintptr_t'. */
|
||||
#define HAVE_UINTPTR_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `union semun'. */
|
||||
/* #undef HAVE_UNION_SEMUN */
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have unix sockets. */
|
||||
/* #undef HAVE_UNIX_SOCKETS */
|
||||
|
||||
/* Define to 1 if you have the `unsetenv' function. */
|
||||
#define HAVE_UNSETENV 1
|
||||
|
||||
/* Define to 1 if you have the `utime' function. */
|
||||
#define HAVE_UTIME 1
|
||||
|
||||
/* Define to 1 if you have the `utimes' function. */
|
||||
/* #undef HAVE_UTIMES */
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
#define HAVE_UTIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <uuid.h> header file. */
|
||||
/* #undef HAVE_UUID_H */
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
/* #undef HAVE_VSNPRINTF */
|
||||
|
||||
/* Define to 1 if you have the `waitpid' function. */
|
||||
/* #undef HAVE_WAITPID */
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#define HAVE_WCHAR_H 1
|
||||
|
||||
/* Define to 1 if you have the `wcstombs' function. */
|
||||
#define HAVE_WCSTOMBS 1
|
||||
|
||||
/* Define to 1 if you have the `wcstombs_l' function. */
|
||||
/* #undef HAVE_WCSTOMBS_L */
|
||||
|
||||
/* Define to 1 if you have the <wctype.h> header file. */
|
||||
#define HAVE_WCTYPE_H 1
|
||||
|
||||
/* Define to 1 if you have the <winldap.h> header file. */
|
||||
/* #undef HAVE_WINLDAP_H */
|
||||
|
||||
/* Define to the appropriate snprintf format for 64-bit ints. */
|
||||
#define INT64_FORMAT "%lld"
|
||||
|
||||
/* Define to build with Kerberos 5 support. (--with-krb5) */
|
||||
/* #undef KRB5 */
|
||||
|
||||
/* Define to 1 if you have __cpuid. */
|
||||
/* #undef HAVE__CPUID */
|
||||
|
||||
/* Define to 1 if you have __get_cpuid. */
|
||||
#define HAVE__GET_CPUID 1
|
||||
|
||||
/* Define to 1 if `locale_t' requires <xlocale.h>. */
|
||||
/* #undef LOCALE_T_IN_XLOCALE */
|
||||
|
||||
/* Define as the maximum alignment requirement of any C data type. */
|
||||
#define MAXIMUM_ALIGNOF 8
|
||||
|
||||
/* Define bytes to use libc memset(). */
|
||||
#define MEMSET_LOOP_LIMIT 1024
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "community@opengauss.org"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "Postgres-XC"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "Postgres-XC 1.1"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "postgres-xc"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.1"
|
||||
|
||||
/* Define to the name of the default PostgreSQL service principal in Kerberos.
|
||||
(--with-krb-srvnam=NAME) */
|
||||
#define PG_KRB_SRVNAM "postgres"
|
||||
|
||||
/* PostgreSQL major version as a string */
|
||||
#define PG_MAJORVERSION "9.2"
|
||||
|
||||
/* PostgreSQL version as a string */
|
||||
#define PG_VERSION "9.2.4"
|
||||
|
||||
/* Gaussdb version as a string*/
|
||||
#define DEF_GS_VERSION "(GaussDB Kernel V500R001C20 build ) compiled at 2021-05-18 17:44:23 commit 0 last mr "
|
||||
|
||||
/* PostgreSQL version as a number */
|
||||
#define PG_VERSION_NUM 90204
|
||||
|
||||
/* Postgres-XC major version as a string */
|
||||
#define PGXC_MAJORVERSION "1.1"
|
||||
|
||||
/* Postgres-XC version as a string */
|
||||
#define PGXC_VERSION "1.1"
|
||||
|
||||
/* Postgres-XC version as a number */
|
||||
#define PGXC_VERSION_NUM
|
||||
|
||||
/* A string containing the version number, platform, and C compiler */
|
||||
#define PG_VERSION_STR "PostgreSQL 9.2.4 (GaussDB Kernel V500R001C20 build ) compiled at 2021-05-18 17:44:23 commit 0 last mr on i686-pc-mingw32, compiled by gcc.exe (GCC) 5.3.0, 32-bit"
|
||||
|
||||
/* A string containing the version number of Postgres-XC, platform, and C compiler */
|
||||
#define PGXC_VERSION_STR "Postgres-XC 1.1 on i686-pc-mingw32, based on PostgreSQL 9.2.4, compiled by gcc.exe (GCC) 5.3.0, 32-bit"
|
||||
|
||||
/* Define to 1 to allow profiling output to be saved separately for each
|
||||
process. */
|
||||
/* #undef PROFILE_PID_DIR */
|
||||
|
||||
/* Define to the necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
/* #undef PTHREAD_CREATE_JOINABLE */
|
||||
|
||||
/* RELSEG_SIZE is the maximum number of blocks allowed in one disk file. Thus,
|
||||
the maximum size of a single file is RELSEG_SIZE * BLCKSZ; relations bigger
|
||||
than that are divided into multiple files. RELSEG_SIZE * BLCKSZ must be
|
||||
less than your OS' limit on file size. This is often 2 GB or 4GB in a
|
||||
32-bit operating system, unless you have large file support enabled. By
|
||||
default, we make the limit 1 GB to avoid any possible integer-overflow
|
||||
problems within the OS. A limit smaller than necessary only means we divide
|
||||
a large relation into more chunks than necessary, so it seems best to err
|
||||
in the direction of a small limit. A power-of-2 value is recommended to
|
||||
save a few cycles in md.c, but is not absolutely required. Changing
|
||||
RELSEG_SIZE requires an initdb. */
|
||||
#define RELSEG_SIZE 131072
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* The size of `off_t', as computed by sizeof. */
|
||||
#define SIZEOF_OFF_T 4
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#define SIZEOF_SIZE_T 4
|
||||
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
#define SIZEOF_VOID_P 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if strerror_r() returns a int. */
|
||||
/* #undef STRERROR_R_INT */
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
/* #undef TM_IN_SYS_TIME */
|
||||
|
||||
/* Define to the appropriate snprintf format for unsigned 64-bit ints. */
|
||||
#define UINT64_FORMAT "%llu"
|
||||
|
||||
/* Define to 1 to build with assertion checks. (--enable-cassert) */
|
||||
/* #undef USE_ASSERT_CHECKING */
|
||||
|
||||
/* Define to 1 to enable llt test. (--enable-llt) */
|
||||
/* #undef ENABLE_LLT */
|
||||
|
||||
/* Define to 1 to enable llvm test. (--enable-llvm) */
|
||||
#define ENABLE_LLVM_COMPILE 1
|
||||
|
||||
/* Define to 1 to enable ut test. (--enable-ut) */
|
||||
/* #undef ENABLE_UT */
|
||||
|
||||
/* Define to 1 to enable qunit test. (--enable-qunit) */
|
||||
/* #undef ENABLE_QUNIT */
|
||||
|
||||
/* Define to 1 to build with Bonjour support. (--with-bonjour) */
|
||||
/* #undef USE_BONJOUR */
|
||||
|
||||
/* Define to 1 if you want float4 values to be passed by value.
|
||||
(--enable-float4-byval) */
|
||||
#define USE_FLOAT4_BYVAL 1
|
||||
|
||||
/* Define to 1 if you want float8, int8, etc values to be passed by value.
|
||||
(--enable-float8-byval) */
|
||||
/* #undef USE_FLOAT8_BYVAL */
|
||||
|
||||
/* Define to 1 if "static inline" works without unwanted warnings from
|
||||
compilations where static inline functions are defined but not called. */
|
||||
#define USE_INLINE 1
|
||||
|
||||
/* Define to 1 if you want 64-bit integer timestamp and interval support.
|
||||
(--enable-integer-datetimes) */
|
||||
#define USE_INTEGER_DATETIMES 1
|
||||
|
||||
/* Define to 1 to build with LDAP support. (--with-ldap) */
|
||||
/* #undef USE_LDAP */
|
||||
|
||||
/* Define to 1 to build with XML support. (--with-libxml) */
|
||||
/* #undef USE_LIBXML */
|
||||
|
||||
/* Define to 1 to use XSLT support when building contrib/xml2.
|
||||
(--with-libxslt) */
|
||||
/* #undef USE_LIBXSLT */
|
||||
|
||||
/* Define to select named POSIX semaphores. */
|
||||
/* #undef USE_NAMED_POSIX_SEMAPHORES */
|
||||
|
||||
/* Define to 1 to build with PAM support. (--with-pam) */
|
||||
/* #undef USE_PAM */
|
||||
|
||||
/* Use replacement snprintf() functions. */
|
||||
#define USE_REPL_SNPRINTF 1
|
||||
|
||||
/* Define to 1 to use slicing-by-8 algorithm. */
|
||||
/* #undef USE_SLICING_BY_8_CRC32C */
|
||||
|
||||
/* Define to 1 use Intel SSE 4.2 CRC instructions. */
|
||||
/* #undef USE_SSE42_CRC32C */
|
||||
|
||||
/* Define to 1 to use Intel SSSE 4.2 CRC instructions with a runtime check. */
|
||||
#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1
|
||||
|
||||
/* Define to build with (Open)SSL support. (--with-openssl) */
|
||||
#define USE_SSL 1
|
||||
|
||||
/* Define to select SysV-style semaphores. */
|
||||
/* #undef USE_SYSV_SEMAPHORES */
|
||||
|
||||
/* Define to select SysV-style shared memory. */
|
||||
/* #undef USE_SYSV_SHARED_MEMORY */
|
||||
|
||||
/* Define to select unnamed POSIX semaphores. */
|
||||
/* #undef USE_UNNAMED_POSIX_SEMAPHORES */
|
||||
|
||||
/* Define to select Win32-style semaphores. */
|
||||
#define USE_WIN32_SEMAPHORES 1
|
||||
|
||||
/* Define to select Win32-style shared memory. */
|
||||
#define USE_WIN32_SHARED_MEMORY 1
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
/* # undef WORDS_BIGENDIAN */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Size of a WAL file block. This need have no particular relation to BLCKSZ.
|
||||
XLOG_BLCKSZ must be a power of 2, and if your system supports O_DIRECT I/O,
|
||||
XLOG_BLCKSZ must be a multiple of the alignment requirement for direct-I/O
|
||||
buffers, else direct I/O may fail. Changing XLOG_BLCKSZ requires an initdb.
|
||||
*/
|
||||
#define XLOG_BLCKSZ 8192
|
||||
|
||||
/* XLOG_SEG_SIZE is the size of a single WAL file. This must be a power of 2
|
||||
and larger than XLOG_BLCKSZ (preferably, a great deal larger than
|
||||
XLOG_BLCKSZ). Changing XLOG_SEG_SIZE requires an initdb. */
|
||||
#define XLOG_SEG_SIZE (16 * 1024 * 1024)
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
|
||||
/* #undef _LARGEFILE_SOURCE */
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define to the type of a signed integer type wide enough to hold a pointer,
|
||||
if such a type exists, and if the system does not define it. */
|
||||
/* #undef intptr_t */
|
||||
|
||||
/* Define to empty if the C compiler does not understand signed types. */
|
||||
/* #undef signed */
|
||||
|
||||
/* Define to the type of an unsigned integer type wide enough to hold a
|
||||
pointer, if such a type exists, and if the system does not define it. */
|
||||
/* #undef uintptr_t */
|
||||
|
||||
/* Define to empty if the keyword `volatile' does not work. Warning: valid
|
||||
code using `volatile' can become incorrect without. Disable with care. */
|
||||
/* #undef volatile */
|
498
windows/build/win32/libpq/include/pg_config_os.h
Normal file
498
windows/build/win32/libpq/include/pg_config_os.h
Normal file
@ -0,0 +1,498 @@
|
||||
/* src/include/port/win32.h */
|
||||
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
#define WIN32_ONLY_COMPILER
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Make sure _WIN32_WINNT has the minimum required value.
|
||||
* Leave a higher value in place.
|
||||
*/
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0501
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#endif
|
||||
/*
|
||||
* Always build with SSPI support. Keep it as a #define in case
|
||||
* we want a switch to disable it sometime in the future.
|
||||
*/
|
||||
#ifndef __BORLANDC__
|
||||
#define ENABLE_SSPI 1
|
||||
#endif
|
||||
|
||||
/* undefine and redefine after #include */
|
||||
#undef mkdir
|
||||
|
||||
#undef ERROR
|
||||
|
||||
/*
|
||||
* The Mingw64 headers choke if this is already defined - they
|
||||
* define it themselves.
|
||||
*/
|
||||
#if !defined(__MINGW64_VERSION_MAJOR) || defined(WIN32_ONLY_COMPILER)
|
||||
#define _WINSOCKAPI_
|
||||
#endif
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#define _WINSOCKAPI_
|
||||
#include <windows.h>
|
||||
#undef small
|
||||
#include <process.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <direct.h>
|
||||
#ifndef __BORLANDC__
|
||||
#include <sys/utime.h> /* for non-unicode version */
|
||||
#endif
|
||||
#undef near
|
||||
|
||||
/* Must be here to avoid conflicting with prototype in windows.h */
|
||||
#define mkdir(a, b) mkdir(a)
|
||||
|
||||
#define ftruncate(a, b) chsize(a, b)
|
||||
|
||||
/* Windows doesn't have fsync() as such, use _commit() */
|
||||
#define fsync(fd) _commit(fd)
|
||||
|
||||
/*
|
||||
* For historical reasons, we allow setting wal_sync_method to
|
||||
* fsync_writethrough on Windows, even though it's really identical to fsync
|
||||
* (both code paths wind up at _commit()).
|
||||
*/
|
||||
#define HAVE_FSYNC_WRITETHROUGH
|
||||
#define FSYNC_WRITETHROUGH_IS_FSYNC
|
||||
|
||||
#define USES_WINSOCK
|
||||
|
||||
/* defines for dynamic linking on Win32 platform */
|
||||
#if defined(WIN32) || defined(__CYGWIN__)
|
||||
|
||||
#if __GNUC__ && !defined(__declspec)
|
||||
#error You need egcs 1.1 or newer for compiling!
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_DLL
|
||||
#define PGDLLIMPORT __declspec(dllexport)
|
||||
#else /* not BUILDING_DLL */
|
||||
#define PGDLLIMPORT __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define PGDLLEXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define PGDLLEXPORT
|
||||
#endif
|
||||
#else /* not CYGWIN, not MSVC, not MingW */
|
||||
#define PGDLLIMPORT
|
||||
#define PGDLLEXPORT
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IPC defines
|
||||
*/
|
||||
#undef HAVE_UNION_SEMUN
|
||||
#define HAVE_UNION_SEMUN 1
|
||||
|
||||
#define IPC_RMID 256
|
||||
#define IPC_CREAT 512
|
||||
#define IPC_EXCL 1024
|
||||
#define IPC_PRIVATE 234564
|
||||
#define IPC_NOWAIT 2048
|
||||
#define IPC_STAT 4096
|
||||
|
||||
#define EACCESS 2048
|
||||
#ifndef EIDRM
|
||||
#define EIDRM 4096
|
||||
#endif
|
||||
|
||||
#define SETALL 8192
|
||||
#define GETNCNT 16384
|
||||
#define GETVAL 65536
|
||||
#define SETVAL 131072
|
||||
#define GETPID 262144
|
||||
|
||||
/*
|
||||
* Signal stuff
|
||||
*
|
||||
* For WIN32, there is no wait() call so there are no wait() macros
|
||||
* to interpret the return value of system(). Instead, system()
|
||||
* return values < 0x100 are used for exit() termination, and higher
|
||||
* values are used to indicated non-exit() termination, which is
|
||||
* similar to a unix-style signal exit (think SIGSEGV ==
|
||||
* STATUS_ACCESS_VIOLATION). Return values are broken up into groups:
|
||||
*
|
||||
* http://msdn2.microsoft.com/en-gb/library/aa489609.aspx
|
||||
*
|
||||
* NT_SUCCESS 0 - 0x3FFFFFFF
|
||||
* NT_INFORMATION 0x40000000 - 0x7FFFFFFF
|
||||
* NT_WARNING 0x80000000 - 0xBFFFFFFF
|
||||
* NT_ERROR 0xC0000000 - 0xFFFFFFFF
|
||||
*
|
||||
* Effectively, we don't care on the severity of the return value from
|
||||
* system(), we just need to know if it was because of exit() or generated
|
||||
* by the system, and it seems values >= 0x100 are system-generated.
|
||||
* See this URL for a list of WIN32 STATUS_* values:
|
||||
*
|
||||
* Wine (URL used in our error messages) -
|
||||
* http://source.winehq.org/source/include/ntstatus.h
|
||||
* Descriptions - http://www.comp.nus.edu.sg/~wuyongzh/my_doc/ntstatus.txt
|
||||
* MS SDK - http://www.nologs.com/ntstatus.html
|
||||
*
|
||||
* It seems the exception lists are in both ntstatus.h and winnt.h, but
|
||||
* ntstatus.h has a more comprehensive list, and it only contains
|
||||
* exception values, rather than winnt, which contains lots of other
|
||||
* things:
|
||||
*
|
||||
* http://www.microsoft.com/msj/0197/exception/exception.aspx
|
||||
*
|
||||
* The ExceptionCode parameter is the number that the operating system
|
||||
* assigned to the exception. You can see a list of various exception codes
|
||||
* in WINNT.H by searching for #defines that start with "STATUS_". For
|
||||
* example, the code for the all-too-familiar STATUS_ACCESS_VIOLATION is
|
||||
* 0xC0000005. A more complete set of exception codes can be found in
|
||||
* NTSTATUS.H from the Windows NT DDK.
|
||||
*
|
||||
* Some day we might want to print descriptions for the most common
|
||||
* exceptions, rather than printing an include file name. We could use
|
||||
* RtlNtStatusToDosError() and pass to FormatMessage(), which can print
|
||||
* the text of error values, but MinGW does not support
|
||||
* RtlNtStatusToDosError().
|
||||
*/
|
||||
#define WIFEXITED(w) (((w)&0XFFFFFF00) == 0)
|
||||
#define WIFSIGNALED(w) (!WIFEXITED(w))
|
||||
#define WEXITSTATUS(w) (w)
|
||||
#define WTERMSIG(w) (w)
|
||||
|
||||
#define sigmask(sig) (1 << ((sig)-1))
|
||||
|
||||
/* Signal function return values */
|
||||
#undef SIG_DFL
|
||||
#undef SIG_ERR
|
||||
#undef SIG_IGN
|
||||
#define SIG_DFL ((pqsigfunc)0)
|
||||
#define SIG_ERR ((pqsigfunc)-1)
|
||||
#define SIG_IGN ((pqsigfunc)1)
|
||||
|
||||
/* Some extra signals */
|
||||
#define SIGHUP 1
|
||||
#define SIGQUIT 3
|
||||
#define SIGTRAP 5
|
||||
#define SIGABRT 22 /* Set to match W32 value -- not UNIX value */
|
||||
#define SIGKILL 9
|
||||
#define SIGPIPE 13
|
||||
#define SIGALRM 14
|
||||
#define SIGSTOP 17
|
||||
#define SIGTSTP 18
|
||||
#define SIGCONT 19
|
||||
#define SIGCHLD 20
|
||||
#define SIGTTIN 21
|
||||
#define SIGTTOU 22 /* Same as SIGABRT -- no problem, I hope */
|
||||
#define SIGWINCH 28
|
||||
#ifndef __BORLANDC__
|
||||
#define SIGUSR1 30
|
||||
#define SIGUSR2 31
|
||||
#endif
|
||||
|
||||
/*
|
||||
* New versions of mingw have gettimeofday() and also declare
|
||||
* struct timezone to support it.
|
||||
*/
|
||||
#ifndef HAVE_GETTIMEOFDAY
|
||||
struct timezone {
|
||||
int tz_minuteswest; /* Minutes west of GMT. */
|
||||
int tz_dsttime; /* Nonzero if DST is ever in effect. */
|
||||
};
|
||||
#endif
|
||||
|
||||
/* for setitimer in backend/port/win32/timer.c */
|
||||
#define ITIMER_REAL 0
|
||||
struct itimerval {
|
||||
struct timeval it_interval;
|
||||
struct timeval it_value;
|
||||
};
|
||||
|
||||
int setitimer(int which, const struct itimerval* value, struct itimerval* ovalue);
|
||||
|
||||
/*
|
||||
* WIN32 does not provide 64-bit off_t, but does provide the functions operating
|
||||
* with 64-bit offsets.
|
||||
*/
|
||||
#define pgoff_t __int64
|
||||
#ifdef WIN32_ONLY_COMPILER
|
||||
#define fseeko(stream, offset, origin) _fseeki64(stream, offset, origin)
|
||||
#define ftello(stream) _ftelli64(stream)
|
||||
#else
|
||||
#ifndef fseeko
|
||||
#define fseeko(stream, offset, origin) fseeko64(stream, offset, origin)
|
||||
#endif
|
||||
#ifndef ftello
|
||||
#define ftello(stream) ftello64(stream)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Supplement to <sys/types.h>.
|
||||
*
|
||||
* Perl already has typedefs for uid_t and gid_t.
|
||||
*/
|
||||
#ifndef PLPERL_HAVE_UID_GID
|
||||
typedef int uid_t;
|
||||
typedef int gid_t;
|
||||
#endif
|
||||
typedef long key_t;
|
||||
|
||||
#ifdef WIN32_ONLY_COMPILER
|
||||
typedef int pid_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Supplement to <sys/stat.h>.
|
||||
*/
|
||||
#define lstat(path, sb) stat((path), (sb))
|
||||
|
||||
/*
|
||||
* Supplement to <fcntl.h>.
|
||||
* This is the same value as _O_NOINHERIT in the MS header file. This is
|
||||
* to ensure that we don't collide with a future definition. It means
|
||||
* we cannot use _O_NOINHERIT ourselves.
|
||||
*/
|
||||
#define O_DSYNC 0x0080
|
||||
|
||||
/*
|
||||
* Supplement to <errno.h>.
|
||||
*/
|
||||
#ifndef _MINGW32
|
||||
#undef EAGAIN
|
||||
#undef EINTR
|
||||
#define EINTR WSAEINTR
|
||||
#define EAGAIN WSAEWOULDBLOCK
|
||||
#ifndef EMSGSIZE
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#endif
|
||||
#ifndef EAFNOSUPPORT
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#endif
|
||||
#ifndef EWOULDBLOCK
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#endif
|
||||
#ifndef ECONNRESET
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#endif
|
||||
#ifndef EINPROGRESS
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#endif
|
||||
#ifndef ENOBUFS
|
||||
#define ENOBUFS WSAENOBUFS
|
||||
#endif
|
||||
#ifndef EPROTONOSUPPORT
|
||||
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#endif
|
||||
#ifndef ECONNREFUSED
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#endif
|
||||
#ifndef EBADFD
|
||||
#define EBADFD WSAENOTSOCK
|
||||
#endif
|
||||
#ifndef EOPNOTSUPP
|
||||
#define EOPNOTSUPP WSAEOPNOTSUPP
|
||||
#endif
|
||||
#else // defined(_MINGW32)
|
||||
#undef EINTR
|
||||
#undef EAGAIN
|
||||
#undef EMSGSIZE
|
||||
#undef EAFNOSUPPORT
|
||||
#undef EWOULDBLOCK
|
||||
#undef ECONNRESET
|
||||
#undef EINPROGRESS
|
||||
#undef ENOBUFS
|
||||
#undef EPROTONOSUPPORT
|
||||
#undef ECONNREFUSED
|
||||
#undef EBADFD
|
||||
#undef EOPNOTSUPP
|
||||
|
||||
#define EINTR WSAEINTR
|
||||
#define EAGAIN WSAEWOULDBLOCK
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#define ENOBUFS WSAENOBUFS
|
||||
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#define EBADFD WSAENOTSOCK
|
||||
#define EOPNOTSUPP WSAEOPNOTSUPP
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* For Microsoft Visual Studio 2010 and above we intentionally redefine
|
||||
* the regular Berkeley error constants and set them to the WSA constants.
|
||||
* Note that this will break if those constants are used for anything else
|
||||
* than Windows Sockets errors.
|
||||
*/
|
||||
#if _MSC_VER >= 1600
|
||||
#pragma warning(disable : 4005)
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#define ENOBUFS WSAENOBUFS
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#define EOPNOTSUPP WSAEOPNOTSUPP
|
||||
#pragma warning(default : 4005)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Extended locale functions with gratuitous underscore prefixes.
|
||||
* (These APIs are nevertheless fully documented by Microsoft.)
|
||||
*/
|
||||
#define locale_t _locale_t
|
||||
#define tolower_l _tolower_l
|
||||
#define toupper_l _toupper_l
|
||||
#define towlower_l _towlower_l
|
||||
#define towupper_l _towupper_l
|
||||
#define isdigit_l _isdigit_l
|
||||
#define iswdigit_l _iswdigit_l
|
||||
#define isalpha_l _isalpha_l
|
||||
#define iswalpha_l _iswalpha_l
|
||||
#define isalnum_l _isalnum_l
|
||||
#define iswalnum_l _iswalnum_l
|
||||
#define isupper_l _isupper_l
|
||||
#define iswupper_l _iswupper_l
|
||||
#define islower_l _islower_l
|
||||
#define iswlower_l _iswlower_l
|
||||
#define isgraph_l _isgraph_l
|
||||
#define iswgraph_l _iswgraph_l
|
||||
#define isprint_l _isprint_l
|
||||
#define iswprint_l _iswprint_l
|
||||
#define ispunct_l _ispunct_l
|
||||
#define iswpunct_l _iswpunct_l
|
||||
#define isspace_l _isspace_l
|
||||
#define iswspace_l _iswspace_l
|
||||
#define strcoll_l _strcoll_l
|
||||
#define wcscoll_l _wcscoll_l
|
||||
#define wcstombs_l _wcstombs_l
|
||||
#define mbstowcs_l _mbstowcs_l
|
||||
|
||||
/* In backend/port/win32/signal.c */
|
||||
extern PGDLLIMPORT volatile int pg_signal_queue;
|
||||
extern PGDLLIMPORT int pg_signal_mask;
|
||||
extern HANDLE pgwin32_signal_event;
|
||||
extern HANDLE pgwin32_initial_signal_pipe;
|
||||
|
||||
#define UNBLOCKED_SIGNAL_QUEUE() (pg_signal_queue & ~pg_signal_mask)
|
||||
|
||||
void pgwin32_signal_initialize(void);
|
||||
HANDLE pgwin32_create_signal_listener(pid_t pid);
|
||||
void pgwin32_dispatch_queued_signals(void);
|
||||
void pg_queue_signal(int signum);
|
||||
|
||||
/* In backend/port/win32/socket.c */
|
||||
#ifndef FRONTEND
|
||||
#define socket(af, type, protocol) pgwin32_socket(af, type, protocol)
|
||||
#define accept(s, addr, addrlen) pgwin32_accept(s, addr, addrlen)
|
||||
#define connect(s, name, namelen) pgwin32_connect(s, name, namelen)
|
||||
#define select(n, r, w, e, timeout) pgwin32_select(n, r, w, e, timeout)
|
||||
#define recv(s, buf, len, flags) pgwin32_recv(s, buf, len, flags)
|
||||
#define send(s, buf, len, flags) pgwin32_send(s, buf, len, flags)
|
||||
|
||||
SOCKET pgwin32_socket(int af, int type, int protocol);
|
||||
SOCKET pgwin32_accept(SOCKET s, struct sockaddr* addr, int* addrlen);
|
||||
int pgwin32_connect(SOCKET s, const struct sockaddr* name, int namelen);
|
||||
int pgwin32_select(int nfds, fd_set* readfs, fd_set* writefds, fd_set* exceptfds, const struct timeval* timeout);
|
||||
int pgwin32_recv(SOCKET s, char* buf, int len, int flags);
|
||||
int pgwin32_send(SOCKET s, const void* buf, int len, int flags);
|
||||
|
||||
const char* pgwin32_socket_strerror(int err);
|
||||
int pgwin32_waitforsinglesocket(SOCKET s, int what, int timeout);
|
||||
|
||||
extern int pgwin32_noblock;
|
||||
|
||||
/* in backend/port/win32/security.c */
|
||||
extern int pgwin32_is_admin(void);
|
||||
extern int pgwin32_is_service(void);
|
||||
#endif
|
||||
|
||||
/* in backend/port/win32_shmem.c */
|
||||
extern int pgwin32_ReserveSharedMemoryRegion(HANDLE);
|
||||
|
||||
/* in backend/port/win32/crashdump.c */
|
||||
extern void pgwin32_install_crashdump_handler(void);
|
||||
|
||||
/* in port/win32error.c */
|
||||
extern void _dosmaperr(unsigned long);
|
||||
|
||||
/* in port/win32env.c */
|
||||
extern int pgwin32_putenv(const char*);
|
||||
extern void pgwin32_unsetenv(const char*);
|
||||
|
||||
#define putenv(x) pgwin32_putenv(x)
|
||||
#define unsetenv(x) pgwin32_unsetenv(x)
|
||||
|
||||
/* Things that exist in MingW headers, but need to be added to MSVC & BCC */
|
||||
#ifdef WIN32_ONLY_COMPILER
|
||||
|
||||
#ifndef _WIN64
|
||||
typedef long ssize_t;
|
||||
#else
|
||||
typedef __int64 ssize_t;
|
||||
#endif
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
typedef unsigned short mode_t;
|
||||
|
||||
#define S_IRUSR _S_IREAD
|
||||
#define S_IWUSR _S_IWRITE
|
||||
#define S_IXUSR _S_IEXEC
|
||||
#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
|
||||
/* see also S_IRGRP etc below */
|
||||
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
|
||||
#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG)
|
||||
#endif /* __BORLANDC__ */
|
||||
|
||||
#define F_OK 0
|
||||
#define X_OK 1 /* test for execute or search permission */
|
||||
#define W_OK 2
|
||||
#define R_OK 4
|
||||
|
||||
#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF))
|
||||
#define isnan(x) _isnan(x)
|
||||
|
||||
/* Pulled from Makefile.port in mingw */
|
||||
#define DLSUFFIX ".dll"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
|
||||
/* for port/dirent.c */
|
||||
#ifndef INVALID_FILE_ATTRIBUTES
|
||||
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
|
||||
#endif
|
||||
|
||||
/* for port/open.c */
|
||||
#ifndef O_RANDOM
|
||||
#define O_RANDOM 0x0010 /* File access is primarily random */
|
||||
#define O_SEQUENTIAL 0x0020 /* File access is primarily sequential */
|
||||
#define O_TEMPORARY 0x0040 /* Temporary file bit */
|
||||
#define O_SHORT_LIVED 0x1000 /* Temporary storage file, try not to flush */
|
||||
#define _O_SHORT_LIVED O_SHORT_LIVED
|
||||
#endif /* ifndef O_RANDOM */
|
||||
#endif /* __BORLANDC__ */
|
||||
#endif /* WIN32_ONLY_COMPILER */
|
||||
|
||||
/* These aren't provided by either MingW or MSVC */
|
||||
#ifndef __BORLANDC__
|
||||
#define S_IRGRP 0
|
||||
#define S_IWGRP 0
|
||||
#define S_IXGRP 0
|
||||
#define S_IRWXG 0
|
||||
#define S_IROTH 0
|
||||
#define S_IWOTH 0
|
||||
#define S_IXOTH 0
|
||||
#define S_IRWXO 0
|
||||
|
||||
#endif /* __BORLANDC__ */
|
12
windows/build/win32/libpq/include/pg_config_paths.h
Normal file
12
windows/build/win32/libpq/include/pg_config_paths.h
Normal file
@ -0,0 +1,12 @@
|
||||
#define PGBINDIR ""
|
||||
#define PGSHAREDIR ""
|
||||
#define SYSCONFDIR ""
|
||||
#define INCLUDEDIR ""
|
||||
#define PKGINCLUDEDIR ""
|
||||
#define INCLUDEDIRSERVER ""
|
||||
#define LIBDIR ""
|
||||
#define PKGLIBDIR ""
|
||||
#define LOCALEDIR ""
|
||||
#define DOCDIR ""
|
||||
#define HTMLDIR ""
|
||||
#define MANDIR ""
|
445
windows/build/win32/libpq/project.sh
Normal file
445
windows/build/win32/libpq/project.sh
Normal file
@ -0,0 +1,445 @@
|
||||
#!/bin/bash
|
||||
MD="mkdir -p"
|
||||
RM="rm -rf"
|
||||
CP="cp -r"
|
||||
ROOT_DIR=$LIB_GAUSSDB_DIR
|
||||
#ROOT_DIR=`pwd`/..
|
||||
SRC_DIR=$ROOT_DIR/opengauss/src
|
||||
LIBPQ_WIN32_DIR=$ROOT_DIR/libpq-win32
|
||||
PREPARED_DIR=$LIBPQ_WIN32_DIR
|
||||
EXPORT_DIR=$LIBPQ_WIN32_DIR/libpq-export
|
||||
|
||||
### function ###
|
||||
function copy_file()
|
||||
{
|
||||
file=$1 #file name
|
||||
src=$2 #source directory
|
||||
dst=$3 #target directory
|
||||
if [ ! -f $src/$file ];then
|
||||
echo "Error: $src/$file doesn't exist, exit."
|
||||
exit -1
|
||||
fi
|
||||
if [ ! -d $dst ];then
|
||||
$MD $dst
|
||||
fi
|
||||
#echo "Copy $src/$file to $dst/$file"
|
||||
$CP $src/$file $dst/$file
|
||||
}
|
||||
|
||||
### function ###
|
||||
function init_win_project()
|
||||
{
|
||||
if [ ! -f $PREPARED_DIR/include/pg_config.h ]; then
|
||||
echo "Error: Header file pg_config.h for Windows lost, exit."
|
||||
exit -1
|
||||
fi
|
||||
if [ ! -f $PREPARED_DIR/include/pg_config_os.h ]; then
|
||||
echo "Error: Header file pg_config_os.h for Windows lost, exit."
|
||||
exit -1
|
||||
fi
|
||||
if [ ! -f $PREPARED_DIR/include/pg_config_paths.h ]; then
|
||||
echo "Error: Header file pg_config_paths.h for Windows lost, exit."
|
||||
exit -1
|
||||
fi
|
||||
if [ ! -f $PREPARED_DIR/include/errcodes.h ]; then
|
||||
echo "Error: Header file errcodes.h for Windows lost, exit."
|
||||
exit -1
|
||||
fi
|
||||
if [ ! -f $PREPARED_DIR/include/libpqdll.def ]; then
|
||||
echo "Error: Interface definition file libpqdll.def for Windows lost, exit."
|
||||
exit -1
|
||||
fi
|
||||
if [ ! -f $PREPARED_DIR/Makefile ];then
|
||||
echo "Error: Makefile for MinGW complier lost, exit."
|
||||
exit -1
|
||||
fi
|
||||
if [ ! -f $PREPARED_DIR/CMakeLists.txt ];then
|
||||
echo "Error: CMakeLists.txt for CMake && MinGW complier lost, exit."
|
||||
exit -1
|
||||
fi
|
||||
# $RM $LIBPQ_WIN32_DIR/include
|
||||
$RM $LIBPQ_WIN32_DIR/src
|
||||
if [ ! -d $LIBPQ_WIN32_DIR/lib ];then
|
||||
$MD $LIBPQ_WIN32_DIR/lib
|
||||
fi
|
||||
}
|
||||
|
||||
### function ###
|
||||
function copy_headers()
|
||||
{ # copy header files
|
||||
# copy form prepared directory
|
||||
copy_file securec.h $LIB_SECURITY_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file securectype.h $LIB_SECURITY_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
#copy_file pg_config.h $PREPARED_DIR $LIBPQ_WIN32_DIR/include
|
||||
#copy_file pg_config_os.h $PREPARED_DIR $LIBPQ_WIN32_DIR/include
|
||||
# include
|
||||
copy_file c.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file cipher.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file datatypes.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file getaddrinfo.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file gs_thread.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file gs_threadlocal.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file pg_config_manual.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file port.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file postgres.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file postgres_ext.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file postgres_fe.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
copy_file securec_check.h $SRC_DIR/include $LIBPQ_WIN32_DIR/include
|
||||
# include/access
|
||||
copy_file attnum.h $SRC_DIR/include/access $LIBPQ_WIN32_DIR/include/access
|
||||
copy_file tupdesc.h $SRC_DIR/include/access $LIBPQ_WIN32_DIR/include/access
|
||||
# include/catlog
|
||||
copy_file genbki.h $SRC_DIR/include/catalog $LIBPQ_WIN32_DIR/include/catalog
|
||||
copy_file pg_attribute.h $SRC_DIR/include/catalog $LIBPQ_WIN32_DIR/include/catalog
|
||||
# include/client_logic
|
||||
copy_file cache.h $SRC_DIR/include/client_logic $LIBPQ_WIN32_DIR/include/client_logic
|
||||
copy_file client_logic.h $SRC_DIR/include/client_logic $LIBPQ_WIN32_DIR/include/client_logic
|
||||
copy_file client_logic_enums.h $SRC_DIR/include/client_logic $LIBPQ_WIN32_DIR/include/client_logic
|
||||
copy_file cstrings_map.h $SRC_DIR/include/client_logic $LIBPQ_WIN32_DIR/include/client_logic
|
||||
# include/gstrace
|
||||
copy_file gstrace_infra.h $SRC_DIR/include/gstrace $LIBPQ_WIN32_DIR/include/gstrace
|
||||
copy_file gstrace_infra_int.h $SRC_DIR/include/gstrace $LIBPQ_WIN32_DIR/include/gstrace
|
||||
copy_file gstrace_tool.h $SRC_DIR/include/gstrace $LIBPQ_WIN32_DIR/include/gstrace
|
||||
# include/libcomm
|
||||
#copy_file libcomm.h $SRC_DIR/include/libcomm $LIBPQ_WIN32_DIR/include/libcomm
|
||||
# include/libpq
|
||||
copy_file auth.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file be-fsstubs.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file cl_state.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file crypt.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file guc_vars.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file hba.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file ip.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file libpq.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file libpq-be.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file libpq-events.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file libpq-fe.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file libpq-fs.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file libpq-int.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file md5.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file pqcomm.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file pqexpbuffer.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file pqformat.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file pqsignal.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
copy_file sha2.h $SRC_DIR/include/libpq $LIBPQ_WIN32_DIR/include/libpq
|
||||
# include/mb
|
||||
copy_file pg_wchar.h $SRC_DIR/include/mb $LIBPQ_WIN32_DIR/include/mb
|
||||
# include/nodes
|
||||
copy_file nodes.h $SRC_DIR/include/nodes $LIBPQ_WIN32_DIR/include/nodes
|
||||
copy_file params.h $SRC_DIR/include/nodes $LIBPQ_WIN32_DIR/include/nodes
|
||||
copy_file parsenodes_common.h $SRC_DIR/include/nodes $LIBPQ_WIN32_DIR/include/nodes
|
||||
copy_file pg_list.h $SRC_DIR/include/nodes $LIBPQ_WIN32_DIR/include/nodes
|
||||
copy_file primnodes.h $SRC_DIR/include/nodes $LIBPQ_WIN32_DIR/include/nodes
|
||||
copy_file value.h $SRC_DIR/include/nodes $LIBPQ_WIN32_DIR/include/nodes
|
||||
# include/parser
|
||||
copy_file backslash_quotes.h $SRC_DIR/include/parser $LIBPQ_WIN32_DIR/include/parser
|
||||
# include/port/win32
|
||||
copy_file dlfcn.h $SRC_DIR/include/port/win32 $LIBPQ_WIN32_DIR/include/port/win32
|
||||
copy_file grp.h $SRC_DIR/include/port/win32 $LIBPQ_WIN32_DIR/include/port/win32
|
||||
copy_file netdb.h $SRC_DIR/include/port/win32 $LIBPQ_WIN32_DIR/include/port/win32
|
||||
copy_file pwd.h $SRC_DIR/include/port/win32 $LIBPQ_WIN32_DIR/include/port/win32
|
||||
# include/port/win32/arpa
|
||||
copy_file inet.h $SRC_DIR/include/port/win32/arpa $LIBPQ_WIN32_DIR/include/port/win32/arpa
|
||||
# include/port/win32/netinet
|
||||
copy_file in.h $SRC_DIR/include/port/win32/netinet $LIBPQ_WIN32_DIR/include/port/win32/netinet
|
||||
# include/port/win32/sys
|
||||
copy_file socket.h $SRC_DIR/include/port/win32/sys $LIBPQ_WIN32_DIR/include/port/win32/sys
|
||||
copy_file wait.h $SRC_DIR/include/port/win32/sys $LIBPQ_WIN32_DIR/include/port/win32/sys
|
||||
# include/port/win32_msvc
|
||||
copy_file dirent.h $SRC_DIR/include/port/win32_msvc $LIBPQ_WIN32_DIR/include/port/win32_msvc
|
||||
copy_file unistd.h $SRC_DIR/include/port/win32_msvc $LIBPQ_WIN32_DIR/include/port/win32_msvc
|
||||
copy_file utime.h $SRC_DIR/include/port/win32_msvc $LIBPQ_WIN32_DIR/include/port/win32_msvc
|
||||
# include/port/win32_msvc/sys
|
||||
copy_file file.h $SRC_DIR/include/port/win32_msvc/sys $LIBPQ_WIN32_DIR/include/port/win32_msvc/sys
|
||||
copy_file param.h $SRC_DIR/include/port/win32_msvc/sys $LIBPQ_WIN32_DIR/include/port/win32_msvc/sys
|
||||
copy_file time.h $SRC_DIR/include/port/win32_msvc/sys $LIBPQ_WIN32_DIR/include/port/win32_msvc/sys
|
||||
# include/storage
|
||||
copy_file spin.h $SRC_DIR/include/storage $LIBPQ_WIN32_DIR/include/storage
|
||||
# include/storage/lock
|
||||
copy_file pg_sema.h $SRC_DIR/include/storage/lock $LIBPQ_WIN32_DIR/include/storage/lock
|
||||
copy_file s_lock.h $SRC_DIR/include/storage/lock $LIBPQ_WIN32_DIR/include/storage/lock
|
||||
# include/utils
|
||||
copy_file be_module.h $SRC_DIR/include/utils $LIBPQ_WIN32_DIR/include/utils
|
||||
copy_file elog.h $SRC_DIR/include/utils $LIBPQ_WIN32_DIR/include/utils
|
||||
copy_file palloc.h $SRC_DIR/include/utils $LIBPQ_WIN32_DIR/include/utils
|
||||
copy_file pg_crc.h $SRC_DIR/include/utils $LIBPQ_WIN32_DIR/include/utils
|
||||
copy_file pg_crc_tables.h $SRC_DIR/include/utils $LIBPQ_WIN32_DIR/include/utils
|
||||
copy_file syscall_lock.h $SRC_DIR/include/utils $LIBPQ_WIN32_DIR/include/utils
|
||||
# copy from prepared directory
|
||||
copy_file errcodes.h $PREPARED_DIR/include $LIBPQ_WIN32_DIR/include/utils # !!!! special source directory
|
||||
}
|
||||
|
||||
function copy_codes()
|
||||
{
|
||||
# src/common/backend/libpq
|
||||
copy_file ip.cpp $SRC_DIR/common/backend/libpq $LIBPQ_WIN32_DIR/src/common/backend/libpq
|
||||
copy_file md5.cpp $SRC_DIR/common/backend/libpq $LIBPQ_WIN32_DIR/src/common/backend/libpq
|
||||
copy_file sha2.cpp $SRC_DIR/common/backend/libpq $LIBPQ_WIN32_DIR/src/common/backend/libpq
|
||||
# src/common/backend/utils/mb
|
||||
copy_file encnames.cpp $SRC_DIR/common/backend/utils/mb $LIBPQ_WIN32_DIR/src/common/backend/utils/mb
|
||||
copy_file wchar.cpp $SRC_DIR/common/backend/utils/mb $LIBPQ_WIN32_DIR/src/common/backend/utils/mb
|
||||
# src/common/interfaces/libpq
|
||||
copy_file fe-auth.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file fe-auth.h $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file fe-connect.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file fe-exec.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file fe-lobj.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file fe-misc.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file fe-print.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file fe-protocol2.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file fe-protocol3.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file fe-secure.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file libpq-events.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file pqexpbuffer.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file pqsignal.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file pqsignal.h $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file pthread-win32.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file win32.cpp $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
copy_file win32.h $SRC_DIR/common/interfaces/libpq $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
# copy interface definition file from prepared directory
|
||||
copy_file libpqdll.def $PREPARED_DIR/include $LIBPQ_WIN32_DIR/src/common/interfaces/libpq
|
||||
# src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file cache_loader.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file cache_loader.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file cached_column_manager.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file cached_global_setting.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file column_settings_list.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file global_settings_list.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file icached_columns.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file types_to_oid.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file cache_refresh_type.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file cached_column_setting.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file cached_setting.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file columns_list.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file icached_column.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file schemas_list.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file cached_column.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file cached_columns.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file column_hook_executors_list.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file dataTypes.def \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file icached_column_manager.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
copy_file search_path_list.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_cache \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_cache
|
||||
# src/common/interfaces/libpq/client_logic_common
|
||||
copy_file client_logic_utils.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_common \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_common
|
||||
copy_file col_full_name.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_common \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_common
|
||||
copy_file cstring_oid_map.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_common \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_common
|
||||
copy_file pg_client_logic_params.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_common \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_common
|
||||
copy_file statement_data.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_common \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_common
|
||||
copy_file table_full_name.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_common \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_common
|
||||
# src/common/interfaces/libpq/client_logic_hooks
|
||||
copy_file abstract_hook_executor.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_hooks \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_hooks
|
||||
copy_file column_hook_executor.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_hooks \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_hooks
|
||||
copy_file global_hook_executor.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_hooks \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_hooks
|
||||
copy_file hook_resource.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_hooks \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_hooks
|
||||
copy_file hooks_factory.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_hooks \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_hooks
|
||||
copy_file hooks_manager.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_hooks \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_hooks
|
||||
# src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file create_stmt_processor.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file prepared_statement.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file processor_utils.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file raw_values_cont.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file stmt_processor.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file where_clause_processor.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file encryption_pre_process.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file prepared_statements_list.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file raw_value.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file raw_values_list.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
copy_file values_processor.h \
|
||||
$SRC_DIR/common/interfaces/libpq/client_logic_processor \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/client_logic_processor
|
||||
# src/common/interfaces/libpq/frontend_parser
|
||||
copy_file datatypes.h \
|
||||
$SRC_DIR/common/interfaces/libpq/frontend_parser \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/frontend_parser
|
||||
copy_file Parser.h \
|
||||
$SRC_DIR/common/interfaces/libpq/frontend_parser \
|
||||
$LIBPQ_WIN32_DIR/src/common/interfaces/libpq/frontend_parser
|
||||
# src/common/port
|
||||
copy_file chklocale.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file dirent.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file getaddrinfo.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file gs_readdir.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file gs_syscall_lock.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file inet_net_ntop.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file path.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file pgsleep.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file pthread-win32.h $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file thread.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file win32error.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file cipher.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file dirmod.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file gs_env_r.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file gs_strerror.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file inet_aton.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file noblock.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file pgstrcasecmp.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file strlcpy.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file win32env.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
copy_file win32setlocale.cpp $SRC_DIR/common/port $LIBPQ_WIN32_DIR/src/common/port
|
||||
# copy from prepared directory
|
||||
copy_file pg_config_paths.h $PREPARED_DIR/include $LIBPQ_WIN32_DIR/src/common/port
|
||||
}
|
||||
|
||||
function copy_makefiles()
|
||||
{
|
||||
copy_file Makefile $PREPARED_DIR $LIBPQ_WIN32_DIR
|
||||
copy_file CMakeLists.txt $PREPARED_DIR $LIBPQ_WIN32_DIR
|
||||
}
|
||||
|
||||
function generate_libpq_export_files()
|
||||
{
|
||||
copy_file auth.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file be-fsstubs.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file guc_vars.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file libpq-be.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file libpq-int.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file pqformat.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file be-fsstubs.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file hba.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file libpq-events.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file md5.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file pqsignal.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file cl_state.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file ip.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file libpq-fe.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file pqcomm.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file sha2.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file crypt.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file libpq.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file libpq-fs.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file pqexpbuffer.h $LIBPQ_WIN32_DIR/include/libpq $EXPORT_DIR/include/libpq
|
||||
copy_file gs_thread.h $LIBPQ_WIN32_DIR/include $EXPORT_DIR/include
|
||||
copy_file postgres_ext.h $LIBPQ_WIN32_DIR/include $EXPORT_DIR/include
|
||||
copy_file gs_threadlocal.h $LIBPQ_WIN32_DIR/include $EXPORT_DIR/include
|
||||
|
||||
if [ ! -d $EXPORT_DIR/lib ];then
|
||||
$MD $EXPORT_DIR/lib
|
||||
fi
|
||||
}
|
||||
|
||||
### function ###
|
||||
function __main__()
|
||||
{
|
||||
echo "Start."
|
||||
echo -n "Step[1] - initialize libpq project directory for Windows ... "
|
||||
init_win_project
|
||||
echo "done."
|
||||
echo -n "Step[2] - copy libpq header files ... "
|
||||
copy_headers
|
||||
echo "done."
|
||||
echo -n "Step[3] - copy libpq source code files ... "
|
||||
copy_codes
|
||||
echo "done."
|
||||
echo -n "Step[4] - prepare Makefile && CMakeLists.txt files for compilation ... "
|
||||
copy_makefiles
|
||||
echo "done."
|
||||
echo -n "Step[5] - generate export directory and files ... "
|
||||
generate_libpq_export_files
|
||||
echo "done."
|
||||
echo "Done."
|
||||
}
|
||||
|
||||
function __clean__()
|
||||
{
|
||||
$RM $LIBPQ_WIN32_DIR/include
|
||||
$RM $LIBPQ_WIN32_DIR/lib
|
||||
$RM $LIBPQ_WIN32_DIR/libpq-export
|
||||
$RM $LIBPQ_WIN32_DIR/src
|
||||
$RM $LIBPQ_WIN32_DIR/CMakeLists.txt
|
||||
$RM $LIBPQ_WIN32_DIR/Makefile
|
||||
}
|
||||
### main ###
|
||||
if [ $# -eq 0 ];then
|
||||
__main__
|
||||
exit 0
|
||||
fi
|
||||
if [ $# -eq 1 -a "x$1" = "xclean" ];then
|
||||
__clean__
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Usage: \"sh $0\" for initialization or \"sh $0 clean\" for cleaning."
|
Reference in New Issue
Block a user