X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4131C14B281A for ; Wed, 11 Aug 2004 14:12:54 -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 29938-06 for ; Wed, 11 Aug 2004 17:12:44 +0000 (GMT) Received: from loncoche.terra.com.br (loncoche.terra.com.br [200.154.55.229]) by svr1.postgresql.org (Postfix) with ESMTP id DEFB614B2825 for ; Wed, 11 Aug 2004 14:12:38 -0300 (ADT) Received: from potosi.terra.com.br (potosi.terra.com.br [200.154.55.131]) by loncoche.terra.com.br (Postfix) with ESMTP id 27917E78BBA for ; Wed, 11 Aug 2004 14:12:35 -0300 (BRT) Received: from [200.176.35.99] (cm-net-poa-C8B02363.brdterra.com.br [200.176.35.99]) (authenticated user erabbott) by potosi.terra.com.br (Postfix) with ESMTP id 08DE137008E for ; Wed, 11 Aug 2004 14:12:35 -0300 (BRT) Message-ID: <411A53CB.8030209@galvao.eti.br> Date: Wed, 11 Aug 2004 14:13:47 -0300 From: =?ISO-8859-1?Q?Er_Galv=E3o_Abbott?= Reply-To: galvao@galvao.eti.br User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: NUMERIC x VARCHAR References: <4119B1C9.2010800@galvao.eti.br> <4119CA63.8050307@galvao.eti.br> In-Reply-To: Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.4 tagged_above=0.0 required=5.0 tests=HTML_40_50, HTML_MESSAGE, HTML_TITLE_EMPTY, MIME_HTML_ONLY, RCVD_IN_NJABL, RCVD_IN_NJABL_PROXY, RCVD_IN_SORBS X-Spam-Level: ** X-Archive-Number: 200408/159 X-Sequence-Number: 7795 Thanks, Michael.

You and "Evil Azrael" (lol) got me. Never thought about leading zeros.

Varchar it is!

Thanks a lot,

-- 
Er Galvão Abbott
Desenvolvedor Web
http://www.galvao.eti.br/
galvao@galvao.eti.br


Michael Glaesemann wrote:

On Aug 11, 2004, at 4:27 PM, Er Galvão Abbott wrote:

It will. As I've said I wont be storing any symbols.

It won't store leading zeros, however. This may or may not be an issue for you.


test=# create table tel (name_id integer not null, tel_numeric numeric(15) not null, tel_varchar varchar(15) not null);
CREATE TABLE
test=# insert into tel (name_id, tel_numeric, tel_varchar) values (1,012345678911234, '012345678911234');
INSERT 17153 1
test=# select * from tel;
 name_id |  tel_numeric   |   tel_varchar
---------+----------------+-----------------
       1 | 12345678911234 | 012345678911234
(1 row)

I would do as another poster suggested: create a telephone number domain as text with the check constraints you desire.

Michael Glaesemann
grzm myrealbox com