X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 003C94758DC for ; Wed, 5 Feb 2003 09:07:20 -0500 (EST) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id C980D474E44 for ; Wed, 5 Feb 2003 09:07:19 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Wed Feb 05 15:07:22 2003 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id PAA13327 for ; Wed, 5 Feb 2003 15:07:21 +0100 (MET) Message-ID: <3E411A99.CFA26B01@rodos.fzk.de> Date: Wed, 05 Feb 2003 15:07:21 +0100 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Inserting a tab character Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/94 X-Sequence-Number: 11492 > > --- Luke Pascoe wrote: > > I have a table which defines various possible file > > delimiters (CHAR(1) NOT > > NULL), for the moment it'll only contain comma and > > tab. Inserting a comma is > > easy, but inserting a tab is proving somewhat more > > difficult. > > > > How do I do it in 'psql'? > > > > --> Try using '\t' for tab. > Example : > INSERT INTO table1(f1) values ('\t'); > > I'm not sure if inserting a TAB character will > cause some side-effects for commands like COPY FROM / > TO since these commands use tab to delimit fields. > If you want to be on the safe side on COPY commands, you could change to BYTEA type. '\t' still works on INSERT, only on retrieval it would show up as '\011'. Regards, Christoph