Skip to content

Impossible to Insert with a select * #670

Closed

Description

@tcastelly

Hello,

I'm trying to add multiple rows with arrays as parameters.
I have a query like this:

INSERT INTO pages_users (user_id, page_id)
SELECT *
FROM UNNEST(sqlc.arg(user_ids)::bigint[], sqlc.arg(page_ids)::VARCHAR(55)[]);

This is my error message:

postgres/queries/pages.sql:18:1: empty edit contents

But the query seems to be valid, I can execute it on postgres.

Thank you for your help.

Activity

  1. kyleconroy commented on Aug 28, 2021

    @kyleconroy
    Collaborator

    I get a unnest(unknown, unknown) errors instead of empty edit contents. https://play.sqlc.dev/p/c080a282d7106d70420c022c7021bece49956ac67c7075c232bc4b14aa0623a1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions