Skip to content

To check if batch is closed if you need to return a pointer to the type the wrong code is generated #1959

Description

@flymedllva

Version

v1.16.0 or 3623ec8, version v1.15.0 has the correct behavior, since there is no batch closeness check

What happened?

To check if batch is closed if you need to return a pointer to the type the wrong code is generated

Screenshot 2022-11-19 at 17 39 42

SQL queries

:batchone

Configuration

version: "2"
engine: "postgresql"
sql_package: "pgx/v4"
emit_db_tags: true
emit_result_struct_pointers: true

What operating system are you using?

macOS

What database engines are you using?

PostgreSQL

What type of code are you generating?

Go

Activity

  1. added
    bugSomething isn't working
    triageNew issues that hasn't been reviewed
    on Nov 19, 2022
  2. JordanP commented on Nov 21, 2022

    @JordanP
    Contributor

    Nothing really wrong in the original PR, it's just that the emit_result_struct_pointers feature flag did not exist when the PGXv5 support was originally submitted.

  3. JordanP commented on Nov 21, 2022

    @JordanP
    Contributor

    It certainly is a regression though,it probably means we moved "old" code to a new place.

  4. flymedllva commented on Nov 21, 2022

    @flymedllva
    ContributorAuthor

    This flag was also for v4. Generally, with this flag there is an error in codogeneration

  5. thesiti92 commented on Jan 13, 2023

    @thesiti92

    would be great to merge this :)

  6. added this to the 1.18.0 milestone on Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions