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

Avoid casting of OIDs to fix compat with Redshift database #370

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

larskanis
Copy link
Collaborator

Redshift doesn't support OID these casts, so we do OID lookup through the pg_proc table and add type 'name' as an alias for 'text'.

Also clean up the type map generation, so that only arrays are separated and all other types can be registered.

Fixes #369

Redshift doesn't support OID these casts, so we do OID lookup through the pg_proc table and add type 'name' as an alias for 'text'.

Also clean up the type map generation, so that only arrays are separated and all other types can be registered.

Fixes ged#369
@larskanis
Copy link
Collaborator Author

@TSMMark Could you try this PR with Redshift?

@TSMMark
Copy link

TSMMark commented Feb 22, 2021

yes will report back after tested

@TSMMark
Copy link

TSMMark commented Feb 22, 2021

@larskanis Sorry but my bundler isn't allowing me to install the pg gem using this commit hash ref, so I'm not able to dig into it and test right now

gem "pg", git: "https://github.com/larskanis/ruby-pg.git", ref: "365008ef71118da01dc9b3f422c9a81ae62602ad"
Bundler could not find compatible versions for gem "pg":
  In Gemfile:
    postgres_to_redshift was resolved to 0.1.2, which depends on
      pg (~> 1.2.0)

    redshift_simple_migrator was resolved to 0.2.1, which depends on
      pg (>= 0.18)

    sequel-redshift was resolved to 0.0.2, which depends on
      pg

    sequel_pg was resolved to 1.14.0, which depends on
      pg (>= 0.18.0, != 1.2.0)

Could not find gem 'pg (~> 1.2.0)', which is required by gem 'redshift_simple_migrator', in any of the relevant sources:
  https://github.com/larskanis/ruby-pg.git (at 365008e@365008e)

Maybe I'm doing something wrong

@larskanis
Copy link
Collaborator Author

The dependency of postgres_to_redshift gem is too strict. I relaxed it in larskanis/postgres_to_redshift@d107914

So this file resolves for me:

source "https://rubygems.org"

gem "pg", git: "https://github.com/larskanis/ruby-pg.git", ref: "365008ef71118da01dc9b3f422c9a81ae62602ad"
gem "postgres_to_redshift", git: "https://github.com/larskanis/postgres_to_redshift", ref: "d1079144e632fb09f3e4cf5bd095dceffa97360c"
gem "redshift_simple_migrator"
gem "sequel-redshift"
gem "sequel_pg"

@TSMMark
Copy link

TSMMark commented Feb 24, 2021

That indeed resolves. Should be able to test soon

@TSMMark
Copy link

TSMMark commented Feb 26, 2021

LGTM

@larskanis larskanis merged commit a558123 into ged:master Feb 26, 2021
@larskanis larskanis deleted the redshift branch February 15, 2022 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build_coder_maps incompatible with Redshift
2 participants