Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D80B9632B4B for ; Tue, 9 Mar 2010 07:14:24 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 52154-05 for ; Tue, 9 Mar 2010 11:14:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay.ptn-ipout01.plus.net (relay.ptn-ipout01.plus.net [212.159.7.35]) by mail.postgresql.org (Postfix) with ESMTP id 4EF25632A2A for ; Tue, 9 Mar 2010 07:14:13 -0400 (AST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAEi8lUvUOFPl/2dsb2JhbACbKnO6XIR5BA Received: from plesk-mail01.plus.net ([212.56.83.229]) by relay.ptn-ipout01.plus.net with ESMTP; 09 Mar 2010 11:14:12 +0000 Received: (qmail 26606 invoked from network); 9 Mar 2010 11:14:11 +0000 Received: from host86-142-60-221.range86-142.btcentralplus.com (HELO osiris.mauzo.dyndns.org) (86.142.60.221) by plesk-mail01.plus.net with SMTP; 9 Mar 2010 11:14:10 +0000 Received: (qmail 15795 invoked by uid 1001); 9 Mar 2010 11:14:10 -0000 Date: Tue, 9 Mar 2010 11:14:10 +0000 From: Ben Morrow To: dennis@teltel.com, pgsql-sql@postgresql.org Subject: Re: Help : insert a bytea data into new table Message-ID: <20100309111410.GA15752@osiris.mauzo.dyndns.org> References: <20100309034626.GA12083@osiris.mauzo.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Newsgroups: pgsql.sql Organization: Who, me? User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.74 tagged_above=-10 required=5 tests=BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 201003/52 X-Sequence-Number: 33759 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 * from mail sender='dennis' You omitted the WHERE. It's very hard to see what's actually going on when you keep mis-typing the commands you used. > 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' No, it still doesn't give that error for me. Show us something you've *actually* *tried*. Ben