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

Support for PostgreSQL's OID data type #1378

Open
developster opened this issue Jan 2, 2024 · 0 comments
Open

Support for PostgreSQL's OID data type #1378

developster opened this issue Jan 2, 2024 · 0 comments

Comments

@developster
Copy link

At the moment this plugin does not support incremental querying for tables with an OID primary key.

The problem is that OID is defined at the moment as an unsigned 4 byte integer but the initial offset is a negative number.

The first query will look like this:
SELECT * FROM "public"."config" WHERE "public"."config"."oid" > -1 ORDER BY "public"."config"."oid" ASC
And PostgreSQL will respond with: OID out of range.

Way to overcome this problem:

  • create a view in source database which casts OID to INT8 cast(id as int8)
  • use query mode and lose the ability to do incremental updates

Suppose the database has all tables with OID primary keys. It would be nice to be able to customize the condition in WHERE clause through a configuration parameter (condition_pattern?) the default being '%s > ?'. In that case it would be possible to do the casts for all the tables with cast(%s as int8) > ?.

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

No branches or pull requests

1 participant