Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error on insert from table #32

Closed
Closed
@ziva777

Description

@ziva777

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp