Re: Variable-length Types

From: KuroiNeko <evpopkov(at)carrier(dot)kiev(dot)ua>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Variable-length Types
Date: 2000-10-15 21:17:57
Message-ID: 39EA1F05.nailA91QW5LV@ed.ed
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2000-10-16 00:39:50 Re: Variable-length Types
Previous Message Itai Zukerman 2000-10-15 20:58:05 Re: Variable-length Types