Re: NUMERIC x VARCHAR - Mailing list pgsql-performance

From Er Galvão Abbott
Subject Re: NUMERIC x VARCHAR
Date
Msg-id 411A53CB.8030209@galvao.eti.br
Whole thread Raw
In response to Re: NUMERIC x VARCHAR  (Michael Glaesemann <grzm@myrealbox.com>)
List pgsql-performance
<font face="Verdana">Thanks, Michael.<br /><br /> You and "Evil Azrael" (lol) got me. Never thought about leading
zeros.<br/><br /> Varchar it is!<br /><br /> Thanks a lot,</font><br /><pre class="moz-signature" cols="72">-- 
 
Er Galvão Abbott
Desenvolvedor Web
<a class="moz-txt-link-freetext" href="http://www.galvao.eti.br/">http://www.galvao.eti.br/</a>
<a class="moz-txt-link-abbreviated" href="mailto:galvao@galvao.eti.br">galvao@galvao.eti.br</a></pre><br /><br />
MichaelGlaesemann wrote:<br /><blockquote cite="midD909485D-EB69-11D8-831D-000A95C88220@myrealbox.com" type="cite"><br
/>On Aug 11, 2004, at 4:27 PM, Er Galvão Abbott wrote: <br /><br /><blockquote type="cite">It will. As I've said I wont
bestoring any symbols. <br /></blockquote><br /> It won't store leading zeros, however. This may or may not be an issue
foryou. <br /><br /><br /> test=# create table tel (name_id integer not null, tel_numeric numeric(15) not null,
tel_varcharvarchar(15) not null); <br /> CREATE TABLE <br /> test=# insert into tel (name_id, tel_numeric, tel_varchar)
values(1,012345678911234, '012345678911234'); <br /> INSERT 17153 1 <br /> test=# select * from tel; <br />  name_id | 
tel_numeric  |   tel_varchar <br /> ---------+----------------+----------------- <br />        1 | 12345678911234 |
012345678911234<br /> (1 row) <br /><br /> I would do as another poster suggested: create a telephone number domain as
textwith the check constraints you desire. <br /><br /> Michael Glaesemann <br /> grzm myrealbox com <br
/></blockquote>

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Storing binary data.
Next
From: "Merlin Moncure"
Date:
Subject: Re: Hardware upgrade for a high-traffic database