Re: Syncing Data of data type BLOB into Postgres- Bytea - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Syncing Data of data type BLOB into Postgres- Bytea
Date
Msg-id 5ad80185-e6fc-d1da-8c7c-fed22e665b93@aklaver.com
Whole thread Raw
In response to Re: Syncing Data of data type BLOB into Postgres- Bytea  (John DeSoi <desoi@pgedit.com>)
List pgsql-general
On 11/15/2016 05:55 PM, John DeSoi wrote:
>
>> On Nov 10, 2016, at 12:55 AM, Cynthia Hombakazi Ngejane <hombakazi.ngejane@gmail.com> wrote:
>>
>> I have two databases SQLlite and Postgres,  SQLite is my local database in it I am saving fingerprint templates that
getcapture on site (offline) and my column is of type BLOB. Now I want to sync these templates into Postgres (to the
server),so I created a column of type bytea but Postgres is refusing to take BLOB it says there was a syntax error. I
amusing Qt c++ 5.7  application  to do the syncing. 
>
> It is going to be hard to help without seeing the exact code you are using to insert and the exact error message you
areseeing. 

Part of the issue is that BLOB in SQLite does not actually mean anything:

http://sqlite.org/datatype3.html

"(Historical note: The "BLOB" type affinity used to be called "NONE".
But that term was easy to confuse with "no affinity" and so it was
renamed.) "

....

"A column with affinity BLOB does not prefer one storage class over
another and no attempt is made to coerce data from one storage class
into another."

So you can stick anything you want in there, which actually is true of
any SQLite 'type'. So the OP is going from inserting into
something(SQLite) that does no input validation to one(Postgres) that does.

>
> John DeSoi, Ph.D.
>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Upgrade from 9.5.4 to 9.6.1
Next
From: Yogesh Sharma
Date:
Subject: Re: Request to share information regarding errors