mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Convert a few datatype input functions to use "soft" error reporting.
This patch converts the input functions for bool, int2, int4, int8, float4, float8, numeric, and contrib/cube to the new soft-error style. array_in and record_in are also converted. There's lots more to do, but this is enough to provide proof-of-concept that the soft-error API is usable, as well as reference examples for how to convert input functions. This patch is mostly by me, but it owes very substantial debt to earlier work by Nikita Glukhov, Andrew Dunstan, and Amul Sul. Thanks to Andres Freund for review. Discussion: https://postgr.es/m/3bbbb0df-7382-bf87-9737-340ba096e034@postgrespro.ru
This commit is contained in:
@ -61,9 +61,12 @@ typedef struct NDBOX
|
||||
|
||||
/* in cubescan.l */
|
||||
extern int cube_yylex(void);
|
||||
extern void cube_yyerror(NDBOX **result, Size scanbuflen, const char *message) pg_attribute_noreturn();
|
||||
extern void cube_yyerror(NDBOX **result, Size scanbuflen,
|
||||
struct Node *escontext,
|
||||
const char *message);
|
||||
extern void cube_scanner_init(const char *str, Size *scanbuflen);
|
||||
extern void cube_scanner_finish(void);
|
||||
|
||||
/* in cubeparse.y */
|
||||
extern int cube_yyparse(NDBOX **result, Size scanbuflen);
|
||||
extern int cube_yyparse(NDBOX **result, Size scanbuflen,
|
||||
struct Node *escontext);
|
||||
|
Reference in New Issue
Block a user