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

Reading BLOB with zero byte #8

Open
doublefint opened this issue Sep 10, 2017 · 0 comments
Open

Reading BLOB with zero byte #8

doublefint opened this issue Sep 10, 2017 · 0 comments

Comments

@doublefint
Copy link

doublefint commented Sep 10, 2017

Hi Guillaume!
Suppose I create a sqlite_fdw for such db:

-- sqlite3 test.db
Create Table test ( id integer Primary Key autoincrement, data blob );
Insert Into test( data ) Values ( X'4869' );  --'4869' is hex encoded 'Hi'
Select id, data From test;
id     data
----- ------
1      Hi
Update test Set data = X'480069'; --zero byte between 
Select id, data From test;  --the same situation will occur in postgres
id     data
----- ------
1      H
--in sqlite I can still get whole blob
Select id, hex(data) hex_data, length(data) len From test; 
id     hex_data  len
----- ---------- -----
1      480069    3

How do I get the whole blob in postgres with sqlite_fdw?
As far as I know, a similar situation was with mysql_fdw

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