mirror of
https://github.com/danog/ext-pq.git
synced 2024-11-26 20:04:44 +01:00
fix build with postgresql < 9.3
This commit is contained in:
parent
eae2468573
commit
ff4439a509
@ -519,23 +519,57 @@ static void php_pqres_object_read_diag(zval *object, void *o, zval *return_value
|
|||||||
char code;
|
char code;
|
||||||
const char *const name;
|
const char *const name;
|
||||||
} diag[] = {
|
} diag[] = {
|
||||||
|
#ifdef PG_DIAG_SEVERITY
|
||||||
{PG_DIAG_SEVERITY, "severity"},
|
{PG_DIAG_SEVERITY, "severity"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_SQLSTATE
|
||||||
{PG_DIAG_SQLSTATE, "sqlstate"},
|
{PG_DIAG_SQLSTATE, "sqlstate"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_MESSAGE_PRIMARY
|
||||||
{PG_DIAG_MESSAGE_PRIMARY, "message_primary"},
|
{PG_DIAG_MESSAGE_PRIMARY, "message_primary"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_MESSAGE_DETAIL
|
||||||
{PG_DIAG_MESSAGE_DETAIL, "message_detail"},
|
{PG_DIAG_MESSAGE_DETAIL, "message_detail"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_MESSAGE_HINT
|
||||||
{PG_DIAG_MESSAGE_HINT, "message_hint"},
|
{PG_DIAG_MESSAGE_HINT, "message_hint"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_STATEMENT_POSITION
|
||||||
{PG_DIAG_STATEMENT_POSITION,"statement_position"},
|
{PG_DIAG_STATEMENT_POSITION,"statement_position"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_INTERNAL_POSITION
|
||||||
{PG_DIAG_INTERNAL_POSITION, "internal_position"},
|
{PG_DIAG_INTERNAL_POSITION, "internal_position"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_INTERNAL_QUERY
|
||||||
{PG_DIAG_INTERNAL_QUERY, "internal_query"},
|
{PG_DIAG_INTERNAL_QUERY, "internal_query"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_CONTEXT
|
||||||
{PG_DIAG_CONTEXT, "context"},
|
{PG_DIAG_CONTEXT, "context"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_SCHEMA_NAME
|
||||||
{PG_DIAG_SCHEMA_NAME, "schema_name"},
|
{PG_DIAG_SCHEMA_NAME, "schema_name"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_TABLE_NAME
|
||||||
{PG_DIAG_TABLE_NAME, "table_name"},
|
{PG_DIAG_TABLE_NAME, "table_name"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_COLUMN_NAME
|
||||||
{PG_DIAG_COLUMN_NAME, "column_name"},
|
{PG_DIAG_COLUMN_NAME, "column_name"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_DATATYPE_NAME
|
||||||
{PG_DIAG_DATATYPE_NAME, "datatype_name"},
|
{PG_DIAG_DATATYPE_NAME, "datatype_name"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_CONSTRAINT_NAME
|
||||||
{PG_DIAG_CONSTRAINT_NAME, "constraint_name"},
|
{PG_DIAG_CONSTRAINT_NAME, "constraint_name"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_SOURCE_FILE
|
||||||
{PG_DIAG_SOURCE_FILE, "source_file"},
|
{PG_DIAG_SOURCE_FILE, "source_file"},
|
||||||
|
#endif
|
||||||
|
#ifdef PG_DIAG_SOURCE_LINE
|
||||||
{PG_DIAG_SOURCE_LINE, "source_line"},
|
{PG_DIAG_SOURCE_LINE, "source_line"},
|
||||||
{PG_DIAG_SOURCE_FUNCTION, "source_function"}
|
#endif
|
||||||
|
#ifdef PG_DIAG_SOURCE_FUNCTION
|
||||||
|
{PG_DIAG_SOURCE_FUNCTION, "source_function"},
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
array_init_size(return_value, 32);
|
array_init_size(return_value, 32);
|
||||||
|
Loading…
Reference in New Issue
Block a user