Received: from Alex2.cte.Dal.Ca (Alex2.cte.Dal.Ca [134.190.17.62]) by hub.org (8.10.1/8.11.0) with ESMTP id e9HGtfW90718 for ; Tue, 17 Oct 2000 12:55:41 -0400 (EDT) (envelope-from CTE@Dal.Ca) Received: from ghost (Ghost.cte.Dal.Ca [134.190.17.89]) by Alex2.cte.Dal.Ca (8.9.3/8.9.3) with SMTP id OAA15471; Tue, 17 Oct 2000 14:11:11 -0300 Message-ID: <00e701c0385a$e9d47180$5911be86@cte.Dal.Ca> From: "DalTech - CTE" To: Cc: "Pgsql-sql" References: <871yxi432t.fsf@matt.w80.math-hat.com> <39E9F80C.D9BE2054@agliodbs.com> Subject: Re: Variable-length Types Date: Tue, 17 Oct 2000 13:54:28 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200010/155 X-Sequence-Number: 1817 > It takes a string and returns something that looks like Varchar(22); > If someone types in 10 digits, it returns output like (###) ###-#### > If a user enters 7 digits, it picks a default area code and returns > (415) ###-####, > and if they type more than 10 digits or enter any digits after an "x", > they get (###) ###-#### x### Why not treat each group of ###s as its own variable? You would then have a lot of freedom to insert defaults if null and the like. -C. Currie