回答編集履歴
2
追記
test
CHANGED
@@ -61,3 +61,35 @@
|
|
61
61
|
} ExecStatusType;
|
62
62
|
|
63
63
|
```
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
値としては下記となるかと思います。
|
68
|
+
|
69
|
+
大体はPGRES_FATAL_ERRORになるのではないでしょうか。
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|status|value|
|
74
|
+
|
75
|
+
|:--|--:|
|
76
|
+
|
77
|
+
|PGRES_EMPTY_QUERY|0|
|
78
|
+
|
79
|
+
|PGRES_COMMAND_OK|1|
|
80
|
+
|
81
|
+
|PGRES_TUPLES_OK|2|
|
82
|
+
|
83
|
+
|PGRES_COPY_OUT|3|
|
84
|
+
|
85
|
+
|PGRES_COPY_IN|4|
|
86
|
+
|
87
|
+
|PGRES_BAD_RESPONSE|5|
|
88
|
+
|
89
|
+
|PGRES_NONFATAL_ERROR|6|
|
90
|
+
|
91
|
+
|PGRES_FATAL_ERROR|7|
|
92
|
+
|
93
|
+
|PGRES_COPY_BOTH|8|
|
94
|
+
|
95
|
+
|PGRES_SINGLE_TUPLE|9|
|
1
追記
test
CHANGED
@@ -9,3 +9,55 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
[付録A PostgreSQLエラーコード](https://www.postgresql.jp/document/9.6/html/errcodes-appendix.html)
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
---
|
16
|
+
|
17
|
+
追記:
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
ext/pdo_pgsqlを見ましたが、libpq-fe.hの下記定義を参照しているのみのようでした。
|
22
|
+
|
23
|
+
pdo_pgsql_errorとpdo_pgsql_error_stmtで返し方が異なるようなので、そのような振る舞いになる点は、ご認識の通りかと思います。
|
24
|
+
|
25
|
+
```c
|
26
|
+
|
27
|
+
typedef enum
|
28
|
+
|
29
|
+
{
|
30
|
+
|
31
|
+
PGRES_EMPTY_QUERY = 0, /* empty query string was executed */
|
32
|
+
|
33
|
+
PGRES_COMMAND_OK, /* a query command that doesn't return
|
34
|
+
|
35
|
+
* anything was executed properly by the
|
36
|
+
|
37
|
+
* backend */
|
38
|
+
|
39
|
+
PGRES_TUPLES_OK, /* a query command that returns tuples was
|
40
|
+
|
41
|
+
* executed properly by the backend, PGresult
|
42
|
+
|
43
|
+
* contains the result tuples */
|
44
|
+
|
45
|
+
PGRES_COPY_OUT, /* Copy Out data transfer in progress */
|
46
|
+
|
47
|
+
PGRES_COPY_IN, /* Copy In data transfer in progress */
|
48
|
+
|
49
|
+
PGRES_BAD_RESPONSE, /* an unexpected response was recv'd from the
|
50
|
+
|
51
|
+
* backend */
|
52
|
+
|
53
|
+
PGRES_NONFATAL_ERROR, /* notice or warning message */
|
54
|
+
|
55
|
+
PGRES_FATAL_ERROR, /* query failed */
|
56
|
+
|
57
|
+
PGRES_COPY_BOTH, /* Copy In/Out data transfer in progress */
|
58
|
+
|
59
|
+
PGRES_SINGLE_TUPLE /* single tuple from larger resultset */
|
60
|
+
|
61
|
+
} ExecStatusType;
|
62
|
+
|
63
|
+
```
|