[Gambas-user] Q:how to save a file.png into Postgresql

Ron_1st ronstk at ...239...
Wed Sep 3 11:51:03 CEST 2008


On Wednesday 03 September 2008, richard terry wrote:
> On Tue, 2 Sep 2008 09:48:55 pm you wrote:
> Ok, that got me a bit further: This is the resultant (failed) insert query .
> First try using $$ as the delimiters as per my code gives this and fails:
> 
> insert into 
> clin_consult.temp_image(piccie)values($$\\211PNG\\015\\012......

---8<-----

> \\251\\370\\003>\\241\\324n\\304~\\303\\331\\000\\000\\000\\000IEND\\256B`\\202')
> WARNING:  nonstandard use of \\ in a string literal
> LINE 1: insert into clin_consult.temp_image(piccie)values('\\211PNG\...
>                                 ^
> HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
> 
> 
> Perhaps someone can understand this and help
> 
> Regards
> 
> Richard
> 


In mysql like syntax the command would be
> LINE 1: insert into clin_consult.temp_image(piccie)values('\\211PNG\...
>                                  ^

The ^ is at the position where th error is.
Is the field  temp_image existing?
Is the _ also allowed in field names as it looks allowed in table names?

What is your field an table name and are they following the syntax rules 
of posgresql, the database system you use, as I rememeber well?



Just reading what I typed I see clin_consult.temp_image(piccie) (values)

Do you mean the field -=- clin_consult.temp_image -=- in table -=- piccies -=- 
or the table -=- clin_consult.temp_image -=- in filed -=- piccies -=- ?????



Should the fieldname not be surrond with quotes while a dot in the
name in most caases is not allowed. 
As far I know the only safe are just only alphanummeric and underscore 
and a name as -=- clin_consult.temp_image -=- looks to me as invalid 
without qoutes surrounding this name constuction.

Try to add a field as 'myfiled' in the table and insert into that filed.
to find out you current fieldname is a invalid field name.Best regards


Ron_1st

-- 
 A: Because it messes up the order in which people normally read text. 
 Q: Why is top-posting such a bad thing? 
 A: Top-posting. 
 Q: What is the most annoying thing in e-mail? 
 




More information about the User mailing list