This source file includes following definitions.
- ZEND_GET_MODULE
- PHP_MSHUTDOWN_FUNCTION
- PHP_MINFO_FUNCTION
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24
25 #include "php.h"
26 #include "php_ini.h"
27 #include "ext/standard/info.h"
28 #include "pdo/php_pdo.h"
29 #include "pdo/php_pdo_driver.h"
30 #include "php_pdo_pgsql.h"
31 #include "php_pdo_pgsql_int.h"
32
33 #ifdef HAVE_PG_CONFIG_H
34 #undef PACKAGE_BUGREPORT
35 #undef PACKAGE_NAME
36 #undef PACKAGE_STRING
37 #undef PACKAGE_TARNAME
38 #undef PACKAGE_VERSION
39 #include <pg_config.h>
40 #endif
41
42
43 const zend_function_entry pdo_pgsql_functions[] = {
44 {NULL, NULL, NULL}
45 };
46
47
48
49
50 #if ZEND_MODULE_API_NO >= 20050922
51 static const zend_module_dep pdo_pgsql_deps[] = {
52 ZEND_MOD_REQUIRED("pdo")
53 ZEND_MOD_END
54 };
55 #endif
56
57
58
59 zend_module_entry pdo_pgsql_module_entry = {
60 #if ZEND_MODULE_API_NO >= 20050922
61 STANDARD_MODULE_HEADER_EX, NULL,
62 pdo_pgsql_deps,
63 #else
64 STANDARD_MODULE_HEADER,
65 #endif
66 "pdo_pgsql",
67 pdo_pgsql_functions,
68 PHP_MINIT(pdo_pgsql),
69 PHP_MSHUTDOWN(pdo_pgsql),
70 NULL,
71 NULL,
72 PHP_MINFO(pdo_pgsql),
73 "1.0.2",
74 STANDARD_MODULE_PROPERTIES
75 };
76
77
78 #ifdef COMPILE_DL_PDO_PGSQL
79 ZEND_GET_MODULE(pdo_pgsql)
80 #endif
81
82
83
84
85
86 PHP_MINIT_FUNCTION(pdo_pgsql)
87 {
88 REGISTER_PDO_CLASS_CONST_LONG("PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT", PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT);
89 REGISTER_PDO_CLASS_CONST_LONG("PGSQL_ATTR_DISABLE_PREPARES", PDO_PGSQL_ATTR_DISABLE_PREPARES);
90 REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_IDLE", (long)PGSQL_TRANSACTION_IDLE);
91 REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_ACTIVE", (long)PGSQL_TRANSACTION_ACTIVE);
92 REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_INTRANS", (long)PGSQL_TRANSACTION_INTRANS);
93 REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_INERROR", (long)PGSQL_TRANSACTION_INERROR);
94 REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_UNKNOWN", (long)PGSQL_TRANSACTION_UNKNOWN);
95
96 php_pdo_register_driver(&pdo_pgsql_driver);
97 return SUCCESS;
98 }
99
100
101
102
103 PHP_MSHUTDOWN_FUNCTION(pdo_pgsql)
104 {
105 php_pdo_unregister_driver(&pdo_pgsql_driver);
106 return SUCCESS;
107 }
108
109
110
111
112 PHP_MINFO_FUNCTION(pdo_pgsql)
113 {
114 php_info_print_table_start();
115 php_info_print_table_header(2, "PDO Driver for PostgreSQL", "enabled");
116 #ifdef HAVE_PG_CONFIG_H
117 php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION);
118 #endif
119 php_info_print_table_row(2, "Module version", pdo_pgsql_module_entry.version);
120 php_info_print_table_row(2, "Revision", " $Id: 0e858dd2051ca8c2fd3c781909a0670ab5fecd36 $ ");
121
122 php_info_print_table_end();
123 }
124
125
126
127
128
129
130
131
132
133