Skip to content

Reading BLOB with zero byte #8

Description

@doublefint

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions