SQL functions and statements
Multi-row INSERT
You can use INSERT to insert multiple rows in the target table, by specifying multiple comma-delimited VALUES lists. For example:
=> CREATE TABLE public.t1(a int, b int, c varchar(16));
CREATE TABLE
=> INSERT INTO t1 VALUES (1,2, 'un, deux'), (3,4, 'trois, quartre');
OUTPUT
--------
2
(1 row)
=> COMMIT;
COMMIT
=> SELECT * FROM t1;
a | b | c
---+---+----------------
1 | 2 | un, deux
3 | 4 | trois, quartre
(4 rows)
UPDATE enhancements
The FROM clause of an UPDATE statement can now reference the target table, as follows:
FROM DEFAULT [join-type] JOIN table-reference [ ON join-predicate ]
DEFAULT specifies the table to update. This keyword can be used only once in the FROM clause, and it cannot be used elsewhere in the UPDATE statement.
UPDATE statements also now support the following hints:
-
General: ALLNODES, EARLY_MATERIALIZATION, LABEL, SKIP_STATISTICS, VERBATIM
-
Join: SYNTACTIC_JOIN, DISTRIB, GBYTYPE, JTYPE, UTYPE
-
Projection: PROJS, SKIP_PROJS
INFER_TABLE_DDL for native and external tables
The INFER_TABLE_DDL function inspects a data file in Parquet, ORC, or Avro format and returns a draft table definition. It supports native and external tables and replaces INFER_EXTERNAL_TABLE_DDL, which is now deprecated.
Aliases for collection functions
For compatibility with other database platforms, ARRAY_COUNT is now an alias of APPLY_COUNT and ARRAY_LENGTH is now an alias of APPLY_COUNT_ELEMENTS. ARRAY_COUNT and ARRAY_LENGTH are no longer deprecated.