summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorDean Rasheed2023-02-04 09:48:51 +0000
committerDean Rasheed2023-02-04 09:48:51 +0000
commitfaff8f8e47f18c7d589453e2e0d841d2bd96c1ac (patch)
tree84c64f4f9cb6e7713d955f8b3193ff84b42c8cee /src/pl
parent1b6f632a35f8715f8c64e7930adebc7f1d292074 (diff)
Allow underscores in integer and numeric constants.
This allows underscores to be used in integer and numeric literals, and their corresponding type input functions, for visual grouping. For example: 1_500_000_000 3.14159_26535_89793 0xffff_ffff 0b_1001_0001 A single underscore is allowed between any 2 digits, or immediately after the base prefix indicator of non-decimal integers, per SQL:202x draft. Peter Eisentraut and Dean Rasheed Discussion: https://postgr.es/m/84aae844-dc55-a4be-86d9-4f0fa405cc97%40enterprisedb.com
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plpgsql/src/expected/plpgsql_trap.out2
-rw-r--r--src/pl/plpgsql/src/sql/plpgsql_trap.sql2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pl/plpgsql/src/expected/plpgsql_trap.out b/src/pl/plpgsql/src/expected/plpgsql_trap.out
index 90cf6c28956..62d1679c28f 100644
--- a/src/pl/plpgsql/src/expected/plpgsql_trap.out
+++ b/src/pl/plpgsql/src/expected/plpgsql_trap.out
@@ -141,7 +141,7 @@ begin
declare x int;
begin
-- we assume this will take longer than 1 second:
- select count(*) into x from generate_series(1, 1000000000000);
+ select count(*) into x from generate_series(1, 1_000_000_000_000);
exception
when others then
raise notice 'caught others?';
diff --git a/src/pl/plpgsql/src/sql/plpgsql_trap.sql b/src/pl/plpgsql/src/sql/plpgsql_trap.sql
index c6c1ad894b5..5459b347e7f 100644
--- a/src/pl/plpgsql/src/sql/plpgsql_trap.sql
+++ b/src/pl/plpgsql/src/sql/plpgsql_trap.sql
@@ -88,7 +88,7 @@ begin
declare x int;
begin
-- we assume this will take longer than 1 second:
- select count(*) into x from generate_series(1, 1000000000000);
+ select count(*) into x from generate_series(1, 1_000_000_000_000);
exception
when others then
raise notice 'caught others?';