PG binary images in bytea column

From: Johan Nel <johan(dot)nel(at)xsinet(dot)co(dot)za>
To: pgsql-general(at)postgresql(dot)org
Subject: PG binary images in bytea column
Date: 2009-07-13 06:54:01
Message-ID: h3elm8$f7v$1@news.eternal-september.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I have a .NET application that uses PG as backend using Npgsql.

I have however a small problem when inserting images into the database.
All goes fine and my images gets uploaded correctly, however after
successful upload the system needs to send out email notifications to
users based on the type of image that was loaded, this also still work.
However the statement to then flag the notification row that it was send
fails. The log file indicates:

WARNING: nonstandard use of \\ in a string literal at character 39.
HINT: Use the escape string syntax for backslashes, e.g. E'\\'

I took the code directly from the help files for Npgsql. My question, how
do one use the E'\\' on a bytea column that is passed into a NpgsqlCommand
statement using NpgsqlParameter?

TIA,

Johan Nel
Pretoria, South Africa.

Browse pgsql-general by date

  From Date Subject
Next Message Mel Flynn 2009-07-13 08:01:51 uuid_hash declaration
Previous Message Thomas Kellerer 2009-07-13 06:23:56 Re: Start With... Connect By?