Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5073347641B for ; Tue, 27 Aug 2002 16:29:19 -0400 (EDT) Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id 11A14476403 for ; Tue, 27 Aug 2002 16:29:18 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g7RKRvg11422; Tue, 27 Aug 2002 16:27:57 -0400 (EDT) From: Bruce Momjian Message-Id: <200208272027.g7RKRvg11422@candle.pha.pa.us> Subject: Re: decode('hallo',???) In-Reply-To: <3D6BDFB6.8080905@math.tu-berlin.de> To: Fritz Lehmann-Grube Date: Tue, 27 Aug 2002 16:27:56 -0400 (EDT) Cc: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/363 X-Sequence-Number: 9209 Fritz Lehmann-Grube wrote: > > hallo somebody, > > what do the functions "encode" and "decode" expect as arguments ? test=> \df decode List of functions Result data type | Schema | Name | Argument data types ------------------+------------+--------+--------------------- bytea | pg_catalog | decode | text, text (1 row) > I was puzzled when I got the following: > > pgdocsample=# \encoding > SQL_ASCII > pgdocsample=# select decode('hallo','SQL_ASCII'); > ERROR: No such encoding as 'SQL_ASCII' > > What have I understood wrong ? Decode is working. The message is complaining about the encoding you have for the session. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073