Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E434E634603 for ; Mon, 8 Mar 2010 23:46:39 -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 78824-07 for ; Tue, 9 Mar 2010 03:46:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay.pcl-ipout02.plus.net (relay.pcl-ipout02.plus.net [212.159.7.100]) by mail.postgresql.org (Postfix) with ESMTP id 54B00633B70 for ; Mon, 8 Mar 2010 23:46:28 -0400 (AST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAINTlUvUOFPl/2dsb2JhbACbMXO5WIR4BA Received: from plesk-mail01.plus.net ([212.56.83.229]) by relay.pcl-ipout02.plus.net with ESMTP; 09 Mar 2010 03:46:27 +0000 Received: (qmail 16660 invoked from network); 9 Mar 2010 03:46:26 +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 03:46:26 +0000 Received: (qmail 12146 invoked by uid 1001); 9 Mar 2010 03:46:26 -0000 Date: Tue, 9 Mar 2010 03:46:26 +0000 From: Ben Morrow To: dennis@teltel.com, pgsql-sql@postgresql.org Subject: Re: Help : insert a bytea data into new table Message-ID: <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=1.827 tagged_above=-10 required=5 tests=BAYES_40=-0.185, FAKE_REPLY_C=2.012 X-Spam-Level: * X-Archive-Number: 201003/51 X-Sequence-Number: 33758 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. 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