Re: UTF-8 context of BYTEA datatype??

Поиск
Список
Период
Сортировка
От SCassidy@overlandstorage.com
Тема Re: UTF-8 context of BYTEA datatype??
Дата
Msg-id OF5AD4ADF8.CA111A55-ON8825717E.0063A354-8825717E.0063A709@overlandstorage.com
обсуждение исходный текст
Ответ на UTF-8 context of BYTEA datatype??  (Rafal Pietrak <rafal@zorro.isa-geek.com>)
Список pgsql-general
Sorry, forgot:


sub escape_bytea {
  my ($instring)=@_;
  my $returnstring=join ('',map {
    my $tmp=ord($_);
    ($tmp >= 32 and $tmp <= 126 and $tmp != 92) ? $_ :
sprintf('\%03o',$tmp);} split (//,$instring));
  return $returnstring;
} # end sub escape_bytea






                  
                           Rafal Pietrak
                  
                      <rafal@zorro.isa-geek.c        To:       SCassidy@overlandstorage.com,
pgsql-general@postgresql.org                 
                      om>                            cc:
                  
                           Sent by:                  Subject:  Re: [GENERAL] UTF-8 context of BYTEA datatype??
                  

                  
                                                      |-------------------|
                  
                      pgsql-general-owner@pos         | [ ] Expand Groups |
                  
                      tgresql.org                     |-------------------|
                  

                  

                  
                           05/30/2006 10:06
                  
                      AM
                  

                  

                  




On Tue, 2006-05-30 at 09:05 -0700, SCassidy@overlandstorage.com wrote:
> Did you try escaping the data:
> my $rc=$sth->bind_param(1, escape_bytea($imgdata),   { pg_type =>
> DBD::Pg::PG_BYTEA });

No. But:
             $ ./test
Undefined subroutine &main::escape_bytea called at ./test line 34.

Where can I find one?
             $ grep -Rl escape_bytea /usr/share/perl* /usr/lib/perl*
... returns nothing. Neither is listed among:
             psql>\df
output.

Where should I look for it?

--
-R

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq





----------------------------------------------------------------------------------------------
Simply protected storage solutions ensure that your information is
automatically safe, readily available and always there, visit us at http://www.overlandstorage.com
----------------------------------------------------------------------------------------------


В списке pgsql-general по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: [HACKERS] Schema Limitations ?
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: UTF-8 context of BYTEA datatype??