v.19.15New Feature
Add Table Function Input for Reading Incoming Data in INSERT SELECT Query
Add table functioninputfor reading incoming data inINSERT SELECTquery. #5450 (palasonic1) #6832 (Anton Popov)
Why it matters
This feature allows users to access the data being inserted in anINSERT SELECT statement as a table function. It enables advanced data manipulation and querying of the input data stream, improving flexibility and functionality when processing data during inserts.How to use it
Use theinput table function inside a SELECT query within an INSERT SELECT statement. For example:INSERT INTO target_table
SELECT * FROM input()
WHERE some_condition;This reads the incoming data via
input() and allows filtering or transformation before inserting.