Re: Help : insert a bytea data into new table
От | dennis |
---|---|
Тема | Re: Help : insert a bytea data into new table |
Дата | |
Msg-id | hn4ub5$n7f$1@news.hub.org обсуждение исходный текст |
Ответ на | Re: Help : insert a bytea data into new table (Ben Morrow <ben@morrow.me.uk>) |
Список | pgsql-sql |
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: text || bytea But if my sql statement has no column "content" the sql works. sql: create table mail_new as select sender,subject from mail sender='dennis' Ben Morrow 提到: > Quoth dennis <dennis@teltel.com>: >> 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. What is xxx? Is it a field you haven't shown us, > or is it a quoted string? > >> error: >> operator does not exist: text || bytea > > That command (with 'xxx' quoted and the AS removed) doesn't give that > error with those table definitions, so you will need to show us your > actual query. > > Ben > >
В списке pgsql-sql по дате отправления: