@@ -11,6 +11,7 @@ use std::io::{MemWriter, BufReader};
1111use std:: io:: util:: LimitReader ;
1212use std:: str;
1313use std:: vec;
14+ use std:: vec_ng:: Vec ;
1415use time:: Timespec ;
1516
1617use self :: array:: { Array , ArrayBase , DimensionInfo } ;
@@ -543,6 +544,12 @@ impl RawToSql for ~[u8] {
543544 }
544545}
545546
547+ impl RawToSql for Vec < u8 > {
548+ fn raw_to_sql < W : Writer > ( & self , w : & mut W ) {
549+ or_fail ! ( w. write( self . as_slice( ) ) )
550+ }
551+ }
552+
546553impl RawToSql for ~str {
547554 fn raw_to_sql < W : Writer > ( & self , w : & mut W ) {
548555 or_fail ! ( w. write( self . as_bytes( ) ) )
@@ -677,6 +684,7 @@ macro_rules! to_raw_to_impl(
677684
678685to_raw_to_impl ! ( PgBool , bool )
679686to_raw_to_impl ! ( PgByteA , ~[ u8 ] )
687+ to_raw_to_impl ! ( PgByteA , Vec <u8 >)
680688to_raw_to_impl ! ( PgVarchar | PgText | PgCharN , ~str )
681689to_raw_to_impl ! ( PgJson , Json )
682690to_raw_to_impl ! ( PgChar , i8 )
@@ -749,6 +757,7 @@ macro_rules! to_array_impl(
749757
750758to_array_impl ! ( PgBoolArray , bool )
751759to_array_impl ! ( PgByteAArray , ~[ u8 ] )
760+ to_array_impl ! ( PgByteAArray , Vec <u8 >)
752761to_array_impl ! ( PgCharArray , i8 )
753762to_array_impl ! ( PgInt2Array , i16 )
754763to_array_impl ! ( PgInt4Array , i32 )
0 commit comments