- Notifications
You must be signed in to change notification settings - Fork2
Closed
Description
It's possible to insert into variable record from table even if amount of fields in the row are different. But there is an error on select variable after insert from a table with "different row type".
Consider next queries:
CREATE TABLE tab (id int, t varchar);INSERT INTO tab VALUES (0, 'str00');SELECT pgv_insert('vars', 'r1', row(1, 'str1', 'str2'));SELECT pgv_insert('vars', 'r0', tab) FROM tab;SELECT pgv_insert('vars', 'r1', tab) FROM tab;SELECT pgv_select('vars', 'r1');
The last one statement ofpgv_select
bring an error like:
pgv_select ----------------- (1,str1,str2) (0,"\rstr00~",)(2 rows)
The output may differs, but apparently there is a problem with memory access here.
A more general question is it should be possible to insert record with different amount of fields in the existing variable? Probably not, since behavior becomes too implicit.
Metadata
Metadata
Assignees
Labels
No labels