Re: [SQL] Help : insert a bytea data into new table

2010-03-15 Thread dennis
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 Ben Morrow 提到: Quoth dennis : Hi Ben here is my function , it's for fi

Re: [SQL] Help : insert a bytea data into new table

2010-03-15 Thread dennis
Postgres : 8.1.4 Dennis Ben Morrow wrote: Quoth dennis: 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 P

Re: [SQL] Help : insert a bytea data into new table

2010-03-15 Thread dennis
Hi Ben here is my function , it's for fix missing chunk problem. It has same problem ,please take look thank for you help -table-- db=# \d usersessiontable; Table "public.usersessiontable" Column | Type | Modifiers ---+---

Re: [SQL] Help : insert a bytea data into new table

2010-03-15 Thread dennis
here is example table name is "mail": column| type - sender|char subject |char content |bytea I want copy some record into new table 'mail_new'. sql: create table mail_new as select * from mail sender='dennis' result has an error: operator does not exist:

Re: [SQL] Help : insert a bytea data into new table

2010-03-11 Thread Ben Morrow
[quoting fixed] Quoth dennis : > Ben Morrow wrote: > > Quoth dennis: > >> 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_li

Re: [SQL] Help : insert a bytea data into new table

2010-03-11 Thread Ben Morrow
Quoth dennis : > 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? Ben --

Re: [SQL] Help : insert a bytea data into new table

2010-03-10 Thread Ben Morrow
Quoth dennis : > Hi Ben > > here is my function , it's for fix missing chunk problem. > It has same problem ,please take look > > > thank for you help > > -table-- > > > db=# \d usersessiontable; > Table "public.usersessiontable" >Column |

Re: [SQL] Help : insert a bytea data into new table

2010-03-09 Thread Ben Morrow
Quoth dennis : > here is example > > table name is "mail": > column| type > - > sender|char > subject |char I presume you mean 'varchar'? > content |bytea > > > I want copy some record into new table 'mail_new'. > > sql: > create table mail_new as select

Re: [SQL] Help : insert a bytea data into new table

2010-03-08 Thread Ben Morrow
Quoth dennis : > > I need to copy some data to new table. > But I encounter some error message. > the table structure > Table A: > c1 char > c2 bytea > > Table B: > c1 char > c2 bytea > > > My sql command: > insert into B as select * from a where c1=xxx 'AS' isn't valid there.