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

Appearance settings

using an EnumCodec with no enums generates invalid SQL #515

Copy link
Copy link
@osi

Description

@osi
Issue body actions

Bug Report

Versions

  • Driver: 0.9.0.RELEASE
  • Database: PostgreSQL 12.10 (Debian 12.10-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
  • Java:
  • OS:

Current Behavior

Create a CodecRegistrar but put nothing in it,

EnumCodec.builder().build()

This generates the following invalid SQL statement

22-05-23 18:56:23.127 UTC [20203] STATEMENT:  SELECT pg_type.oid, typarray, typname, typcategory   FROM pg_catalog.pg_type   LEFT   JOIN (select ns.oid as nspoid, ns.nspname, r.r           from pg_namespace as ns           join ( select s.r, (current_schemas(false))[s.r] as nspname                    from generate_series(1, array_upper(current_schemas(false), 1)) as s(r) ) as r          using ( nspname )        ) as sp     ON sp.nspoid = typnamespace  WHERE typname IN ()  ORDER BY sp.r, pg_type.oid DESC ;
2022-05-23 18:56:23.127 UTC [20202] ERROR:  syntax error at or near ")" at character 429

Expected behavior/code

The CodecRegistar returned from io.r2dbc.postgresql.codec.EnumCodec.Builder#build should do nothing if no enums have been registered

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.