[quoting fixed]
Quoth dennis <dennis.mails@gmail.com>:
> Ben Morrow wrote:
> > Quoth dennis<dennis@teltel.com>:
> >> Dear Ben
> >>
> >> thanks for you anwser.
> >> I try to add function quote_literal on my sql statement .
> >>
> >> but it raise other error message (quote_literal not support bytea format):
> >> function quote_literal(bytea) does not exist
> >
> > Which Postgres version are you using?
>
> Postgres : 8.1.4
Then I think you want
create function quote_literal (bytea) returns text immutable strict language plpgsql as $$
begin return 'E''' || replace(encode($1, 'escape'), E'\\', E'\\\\')
|| ''''; end; $$;
Ben