> Hi,
>       Can somebody give me an example of how to insert a byte array for
> example
> { 12, 24 , 0, 3 , '\' , 40 } into a column declared as type bytea.
> Statements in psql is what I am looking forward to know

Use the string 'abc\003d'.  Double-backslashes are optional.  Bytea
outputs data with double-backslashes.
        
        test=> insert into vv values ('ab\003d');
        INSERT 27465 1
        test=> select * from vv;
            x    
        ---------
         ab\003d
        (1 row)
        
        test=> insert into vv values ('ab\\003d');
        INSERT 27466 1
        test=> select * from vv;
            x    
        ---------
         ab\003d
         ab\003d
        (2 rows)

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Reply via email to