Mercurial > hg > orthanc-databases
annotate Framework/PostgreSQL/PostgreSQLIncludes.h @ 536:4ecf50a4521c find-refactoring tip
sync ISqlLookupFormatter from Orthanc + fix bug 224: LIMIT shall not be used with MSSQL
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Fri, 06 Sep 2024 16:56:37 +0200 |
parents | 54d518dcd74a |
children |
rev | line source |
---|---|
103 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
507
54d518dcd74a
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
459
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
54d518dcd74a
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
459
diff
changeset
|
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
459
ecd0b719cff5
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
389
diff
changeset
|
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
103 | 8 * |
9 * This program is free software: you can redistribute it and/or | |
10 * modify it under the terms of the GNU Affero General Public License | |
11 * as published by the Free Software Foundation, either version 3 of | |
12 * the License, or (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, but | |
15 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 * Affero General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU Affero General Public License | |
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 **/ | |
22 | |
23 | |
24 #pragma once | |
25 | |
108 | 26 // These includes are necessary for compilation on OS X |
27 #include <unistd.h> | |
28 #include <vector> | |
29 #include <map> | |
30 #include <cmath> | |
152 | 31 #include <Enumerations.h> |
108 | 32 |
177
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
33 // Get "ntohl()" defined |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
34 #if defined(_WIN32) |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
35 # include <winsock.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
36 #else |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
37 # include <arpa/inet.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
38 #endif |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
39 |
103 | 40 // PostgreSQL includes |
41 #include <pg_config.h> | |
42 | |
172
8c7bb94adff7
trying upgrade from libpq 9.6.1 to 13.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
43 #if !defined(PG_VERSION_NUM) |
8c7bb94adff7
trying upgrade from libpq 9.6.1 to 13.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
44 # error PG_VERSION_NUM is not defined |
8c7bb94adff7
trying upgrade from libpq 9.6.1 to 13.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
45 #endif |
8c7bb94adff7
trying upgrade from libpq 9.6.1 to 13.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
152
diff
changeset
|
46 |
177
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
47 #if PG_VERSION_NUM >= 110000 |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
48 # include <catalog/pg_type_d.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
49 #else |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
50 # include <postgres.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
51 # undef LOG // This one comes from <postgres.h>, and conflicts with <Core/Logging.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
52 # include <catalog/pg_type.h> |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
53 #endif |
02ad3ea95fca
fix build on ubuntu 16.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
176
diff
changeset
|
54 |
103 | 55 #include <libpq-fe.h> |