Re: Syncing Data of data type BLOB into Postgres- Bytea

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Syncing Data of data type BLOB into Postgres- Bytea
Дата
Msg-id 5ad80185-e6fc-d1da-8c7c-fed22e665b93@aklaver.com
обсуждение исходный текст
Ответ на Re: Syncing Data of data type BLOB into Postgres- Bytea  (John DeSoi <desoi@pgedit.com>)
Список 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 по дате отправления:

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Re: Upgrade from 9.5.4 to 9.6.1
Следующее
От: Yogesh Sharma
Дата:
Сообщение: Re: Request to share information regarding errors