sqlite_fdw
sqlite_fdw copied to clipboard
Reading BLOB with zero byte
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