pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Er Galvão Abbott <galvao@galvao.eti.br>
To: pgsql-performance@postgresql.org
Subject: Re: NUMERIC x VARCHAR
Date: Wed, 11 Aug 2004 14:13:47 -0300
Message-ID: <411A53CB.8030209@galvao.eti.br> (raw)
In-Reply-To: <D909485D-EB69-11D8-831D-000A95C88220@myrealbox.com>
References: <4119B1C9.2010800@galvao.eti.br>
	<opscj2gwgscq72hf@musicbox>
	<4119CA63.8050307@galvao.eti.br>
	<D909485D-EB69-11D8-831D-000A95C88220@myrealbox.com>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<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&atilde;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>
Michael Glaesemann wrote:<br>
<blockquote cite="midD909485D-EB69-11D8-831D-000A95C88220@myrealbox.com"
 type="cite"><br>
On Aug 11, 2004, at 4:27 PM, Er Galv&atilde;o Abbott wrote:
  <br>
  <br>
  <blockquote type="cite">It will. As I've said I wont be storing any
symbols.
    <br>
  </blockquote>
  <br>
It won't store leading zeros, however. This may or may not be an issue
for you.
  <br>
  <br>
  <br>
test=# create table tel (name_id integer not null, tel_numeric
numeric(15) not null, tel_varchar varchar(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>
&nbsp;name_id |&nbsp; tel_numeric&nbsp;&nbsp; |&nbsp;&nbsp; tel_varchar
  <br>
---------+----------------+-----------------
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | 12345678911234 | 012345678911234
  <br>
(1 row)
  <br>
  <br>
I would do as another poster suggested: create a telephone number
domain as text with the check constraints you desire.
  <br>
  <br>
Michael Glaesemann
  <br>
grzm myrealbox com
  <br>
</blockquote>
</body>
</html>



view thread (7+ messages)  latest in thread

Message-ID: <411A53CB.8030209@galvao.eti.br>
Permalink:  ../411A53CB.8030209@galvao.eti.br/
Also on:    postgresql.org/message-id/411A53CB.8030209@galvao.eti.br

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: galvao@galvao.eti.br
  Subject: Re: NUMERIC x VARCHAR
  In-Reply-To: <411A53CB.8030209@galvao.eti.br>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox