shuttle-hq / synth

The Declarative Data Generator
https://www.getsynth.com/
Apache License 2.0
1.37k stars 107 forks source link

Camelcase table names in PostgreSQL are not treated properly. #389

Closed mhorbul closed 1 year ago

mhorbul commented 1 year ago

Describe the bug synth does not respect CaMelCase table names in PostgreSQL properly.

To Reproduce Steps to reproduce the behavior:

  1. Create a table in PostgreSQL database with the name "fooBar"

    $ psql -c 'create table "fooBar" (id integer);'
  2. Run synth import mydb --from postgresql://...

  3. See the error

    
    Error: error returned from database: relation "foobar" does not exist

Caused by: relation "foobar" does not exist



**Expected behavior**
`synth` should support table names formatted in different cases in PostgreSQL.

**Environment (please complete the following information):**
 - OS: MacOS 13.0
 - PostgreSQL: 14.5 (Debian 14.5-1.pgdg110+1)
iamwacko commented 1 year ago

I made some changes to your PR and CI passes. People will still need to compile it themselves to use this, as I am waiting until I have fixed 1.65 compatibility to release a new update.

iamwacko commented 1 year ago

@all-contributors please add @iamwacko review.

allcontributors[bot] commented 1 year ago

@iamwacko

I've updated the pull request to add @iamwacko! :tada: