pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: KuroiNeko <evpopkov@carrier.kiev.ua>
To: pgsql-sql@postgresql.org
Subject: Re: Variable-length Types
Date: Sun, 15 Oct 2000 21:17:57 +0000
Message-ID: <39EA1F05.nailA91QW5LV@ed.ed> (raw)
References: <871yxi432t.fsf@matt.w80.math-hat.com>
	<39E9F80C.D9BE2054@agliodbs.com>
	<5470.971641584@sss.pgh.pa.us>
	<39EA154F.A5D9C9A2@agliodbs.com>


 Josh,

> Thanks. You're probably right ... reformatting the phone numbers is
> going to be a lot less work than a custom type.

 I remember from  the old days of Delphi/InterBase, and  even older days of
Paradox, there were so called input masks, US phone code mask would be like

(999)_000-00-00

 or  something like  that (no  default values)  Borland has  released their
Turbo stuff for public domain, so it might be worth looking at.
 Implementing a  generic picture functions  (as in PL/I) would  probably be
easier and  cover more cases.  However, watch your back  with user-supplied
format strings, there's a plenty of ruined lives at BugTraq :)
 I'm just not sure what to do if 8 or 9 digits are supplied? Maybe, reject,
assuming that  such things should  be caught  by UI, and  if we get  such a
weird thing, there's something really really wrong?


--

 Well I tried to be meek
  And I have tried to be mild
 But I spat like a woman
  And I sulked like a child
 I have lived behind the walls
  That have made me alone
 Striven for peace
  Which I never have known

 Dire Straits, Brothers In Arms, The Man's Too Strong (Knopfler)




view thread (10+ messages)  latest in thread

Message-ID: <39EA1F05.nailA91QW5LV@ed.ed>
Permalink:  ../39EA1F05.nailA91QW5LV@ed.ed/
Also on:    postgresql.org/message-id/39EA1F05.nailA91QW5LV@ed.ed

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: evpopkov@carrier.kiev.ua
  Subject: Re: Variable-length Types
  In-Reply-To: <39EA1F05.nailA91QW5LV@ed.ed>
  References: <871yxi432t.fsf@matt.w80.math-hat.com> <39E9F80C.D9BE2054@agliodbs.com> <5470.971641584@sss.pgh.pa.us> <39EA154F.A5D9C9A2@agliodbs.com> <39EA1F05.nailA91QW5LV@ed.ed>

* 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