From: Kenneth Gonsalves <lawgon@thenilgiris.com>
To: Premsun Choltanwanich <Premsun@nsasia.co.th>
To: getsreejith@gmail.com
To: pgsql-sql@postgresql.org
Subject: Re: Image Insert Postgresql DB
Date: Tue, 23 Nov 2004 13:10:27 +0530
Message-ID: <0411231310270N.01150@thenilgiris.com> (raw)
In-Reply-To: <s1a346c8.047@jupiter.nsasia.co.th>
References: <s1a346c8.047@jupiter.nsasia.co.th>
On Tuesday 23 November 2004 12:48 pm, Premsun Choltanwanich wrote:
> I face this same problem when I try to insert image by lo_import to
> database with my client files. I already change the way to bytea data
> type but it's not work. The error return like type mismatch when I try
> to insert it from Binary variable.
>
> Why I cannot insert it? If anybody found some solution please reply on
> this topic for me too.
you must escape the octets with \\ that is two backslashes and not one
backslash.
for example if your binary data is like this:
\x05\x00\x02
you must make it like so:
\\x05\\x00\\x02
please see chapter 8.4 of the postgresql manual.
kg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lawgon@thenilgiris.com, Premsun@nsasia.co.th, getsreejith@gmail.com
Subject: Re: Image Insert Postgresql DB
In-Reply-To: <0411231310270N.01150@thenilgiris.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox