mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
Deduplicate "invalid input syntax" messages for various types.
Previously a lot of the error messages referenced the type in the error message itself. That requires that the message is translated separately for each type. Note that currently a few smallint cases continue to reference the integer, rather than smallint, type. A later patch will create a separate routine for 16bit input. Author: Andres Freund Discussion: https://postgr.es/m/20180707200158.wpqkd7rjr4jxq5g7@alap3.anarazel.de
This commit is contained in:
@ -43,7 +43,7 @@ SELECT * FROM subtransaction_tbl;
|
||||
|
||||
TRUNCATE subtransaction_tbl;
|
||||
SELECT subtransaction_test('SPI');
|
||||
ERROR: spiexceptions.InvalidTextRepresentation: invalid input syntax for integer: "oops"
|
||||
ERROR: spiexceptions.InvalidTextRepresentation: invalid input syntax for type integer: "oops"
|
||||
LINE 1: INSERT INTO subtransaction_tbl VALUES ('oops')
|
||||
^
|
||||
QUERY: INSERT INTO subtransaction_tbl VALUES ('oops')
|
||||
@ -95,7 +95,7 @@ SELECT * FROM subtransaction_tbl;
|
||||
|
||||
TRUNCATE subtransaction_tbl;
|
||||
SELECT subtransaction_ctx_test('SPI');
|
||||
ERROR: spiexceptions.InvalidTextRepresentation: invalid input syntax for integer: "oops"
|
||||
ERROR: spiexceptions.InvalidTextRepresentation: invalid input syntax for type integer: "oops"
|
||||
LINE 1: INSERT INTO subtransaction_tbl VALUES ('oops')
|
||||
^
|
||||
QUERY: INSERT INTO subtransaction_tbl VALUES ('oops')
|
||||
|
@ -684,7 +684,7 @@ CREATE FUNCTION test_type_conversion_array_mixed2() RETURNS int[] AS $$
|
||||
return [123, 'abc']
|
||||
$$ LANGUAGE plpythonu;
|
||||
SELECT * FROM test_type_conversion_array_mixed2();
|
||||
ERROR: invalid input syntax for integer: "abc"
|
||||
ERROR: invalid input syntax for type integer: "abc"
|
||||
CONTEXT: while creating return value
|
||||
PL/Python function "test_type_conversion_array_mixed2"
|
||||
CREATE FUNCTION test_type_conversion_mdarray_malformed() RETURNS int[] AS $$
|
||||
|
Reference in New Issue
Block a user