inserting bytea using PHPs pg_escape_bytea()

From: Martín Marqués <martin(dot)marques(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: inserting bytea using PHPs pg_escape_bytea()
Date: 2011-10-19 17:30:21
Message-ID: CABeG9LtR1YECFV5xDvMCW3sRpSH95N=8Ru6Os_kd+FUnENQZHg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have some scripts that upload some images to the DB, specifically to
a bytea column. For that I use PHPs (all scripts are in PHP)
pg_escape_bytea (and pg_unescape_bytea after extraction) before
inserting. Images go good in the DB and are shown correctly after
extraction, so it looks like there is no problem at all.

The only concern I have is that on insertion, I get this WARNING:

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

Should I worry? What does it mean?

--
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bob Hatfield 2011-10-19 18:00:41 Re: Are file system level differential/incremental backups possible?
Previous Message John R Pierce 2011-10-19 17:23:22 Re: Recovery from Archive files