X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 32ECCD1B193 for ; Mon, 7 Jun 2004 04:30:49 -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 14682-05 for ; Mon, 7 Jun 2004 07:30:46 +0000 (GMT) Received: from rock.spider.ru (rock.spider.ru [62.183.34.226]) by svr1.postgresql.org (Postfix) with ESMTP id 957ABD1B459 for ; Mon, 7 Jun 2004 04:30:42 -0300 (ADT) Received: from rock (localhost [127.0.0.1]) by rock (Postfix) with SMTP id E038591280 for ; Mon, 7 Jun 2004 11:30:41 +0400 (MSD) Received: from sad.localnet.ru (sad.localnet.ru [10.0.0.33]) by rock.spider.ru (Postfix) with ESMTP id D251E9127C for ; Mon, 7 Jun 2004 11:30:40 +0400 (MSD) Content-Type: text/plain; charset="us-ascii" From: sad Organization: IT To: pgsql-sql@postgresql.org Subject: empty string casting to typed value Date: Mon, 7 Jun 2004 10:37:44 +0400 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200406071037.44547.sad@bankir.ru> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/49 X-Sequence-Number: 17994 Hello It is clear that '' is a bad integer or timestamp representation but during the user input NULLs are usually represented with empty strings sometimes bunch of 'if empty' instructions grows huge (and in case of casting to timestamp apostrophes make sense) Why you prohibit casting ''::int to NULL ? What would you advice ? thnx