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

Blob column are only 3 bytes #11

Open
InconceivableRobotics opened this issue May 8, 2019 · 0 comments
Open

Blob column are only 3 bytes #11

InconceivableRobotics opened this issue May 8, 2019 · 0 comments

Comments

@InconceivableRobotics
Copy link

InconceivableRobotics commented May 8, 2019

I have a sqlite database with blob columns. When I run the following query in sqlite, I'm seeing sizes around 1900

SELECT length(tile_data) from tiles limit 100;

After creating the foreign table, when I execute the corresponding query in postgres, every row is returning 3. Is this a problem with how I created the foreign table or is it a limitation of the sqlite_fdw?

SELECT octet_length(tile_data) from foreign_tiles limit 100;

The create table statement was something like the following (just removed the other column definitions to simplify it)

CREATE FOREIGN TABLE foreign_tiles (
tile_data bytea
) SERVER sqlite_server OPTIONS (table 'tiles')

NOTE: I confirmed that the issue remains even if I use IMPORT FOREIGN SCHEMA to bring the tables in.

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