Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A double-quote within a database name causes the psql source to throw an exception #20456

Closed
edmundito opened this issue Dec 13, 2022 · 2 comments · Fixed by #23383
Closed

A double-quote within a database name causes the psql source to throw an exception #20456

edmundito opened this issue Dec 13, 2022 · 2 comments · Fixed by #23383
Assignees
Labels
autoteam connectors/source/postgres needs-triage team/db-dw-sources Backlog for Database and Data Warehouse Sources team type/bug Something isn't working

Comments

@edmundito
Copy link
Contributor

edmundito commented Dec 13, 2022

Environment

  • Airbyte version: 0.40.25
  • Source Connector and version: Postgres 1.0.33
  • Step where error happened: Setup new connection / Setup source

Current Behavior

Error in log

Expected Behavior

It should be able to handle name with escaped double-quote

Logs

Exception occurred while getting the delegate read iterator, closing SSH tunnel
Stack Trace: org.postgresql.util.PSQLException: ERROR: zero-length delimited identifier at or near """"
Position: 209
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675

Steps to Reproduce

  1. Create a postgres table with an escaped name in a column
  2. Create a source from the table
@edmundito edmundito added type/bug Something isn't working needs-triage labels Dec 13, 2022
@octavia-squidington-iv octavia-squidington-iv added autoteam team/db-dw-sources Backlog for Database and Data Warehouse Sources team and removed team/triage labels Dec 14, 2022
@bleonard
Copy link
Contributor

bleonard commented Jan 18, 2023

something to add to test case for table names and column names.

@rodireich
Copy link
Contributor

rodireich commented Jan 18, 2023

The escaping fixes I made as part of column selection touched table and column names. (#20055)
Maybe need to apply to db name as well.
@edmundito do you know if other characters (e.g plus sign, comma, asterisk etc.) present a problem or is it just double quote?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autoteam connectors/source/postgres needs-triage team/db-dw-sources Backlog for Database and Data Warehouse Sources team type/bug Something isn't working
Projects
None yet
5 participants