X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0082ADA107 for ; Wed, 19 Oct 2005 07:19:10 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 16135-02 for ; Wed, 19 Oct 2005 10:19:05 +0000 (GMT) Received: from pjetlic.mobart.hr (pjetlic.mobart.hr [80.80.51.10]) by svr1.postgresql.org (Postfix) with ESMTP id 724BED70A1 for ; Wed, 19 Oct 2005 07:19:06 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by pjetlic.mobart.hr (Postfix) with ESMTP id 49EF817A10 for ; Wed, 19 Oct 2005 12:19:08 +0200 (CEST) Received: from pjetlic.mobart.hr ([127.0.0.1]) by localhost (pjetlic [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31829-04-12 for ; Wed, 19 Oct 2005 12:19:08 +0200 (CEST) Received: from mike.mobart.hr (mike.mobart.hr [192.168.10.94]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by pjetlic.mobart.hr (Postfix) with ESMTP id 2CDE512BC5 for ; Wed, 19 Oct 2005 12:19:08 +0200 (CEST) Subject: Field Separator not working? From: Mario Splivalo Reply-To: mario.splivalo@mobart.hr To: PostgresSQL list Content-Type: text/plain Organization: Mob-Art Date: Wed, 19 Oct 2005 12:19:12 +0200 Message-Id: <1129717152.3186.5.camel@ekim> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by OpenSource AV+AS Mail Server X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 required=5 tests=[AWL=0.009] X-Spam-Level: X-Archive-Number: 200510/217 X-Sequence-Number: 23070 I'm having troubles setting the field separator. I tried this on pg7.4, 8.0 and 8.1beta, and I always get the same results. So, from within psql i do: pulitzer2=# select * from pg_user; usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig -----------+----------+-------------+----------+-----------+----------+----------+----------- mario | 1 | t | t | t | ******** | | postgres | 100 | t | t | t | ******** | | pulitzer2 | 102 | f | f | f | ******** | infinity | 101 | 101 | f | f | f | ******** | infinity | (4 rows) pulitzer2=# \t Showing only tuples. pulitzer2=# \f# Field separator is "#". pulitzer2=# select * from pg_user; mario | 1 | t | t | t | ******** | | postgres | 100 | t | t | t | ******** | | pulitzer2 | 102 | f | f | f | ******** | infinity | 101 | 101 | f | f | f | ******** | infinity | pulitzer2=# psql does tell me that I changed the field separator to "#", but it still uses "|" as separator. I'm parsing the script from bash, using psql, and setting the field separator options on the command line, but I get similair results, the field separator is always "|", so I need to awk-it with -F, but sometimes I have problems because data in my tables often contain "|" charachter. I've been looking trough the psql source code, but just like that, it's too big hassle for me now :) Am I doing something wrong? Mike -- Mario Splivalo Mob-Art mario.splivalo@mobart.hr "I can do it quick, I can do it cheap, I can do it well. Pick any two."