Re: [GENERAL] US Telephone Number Type

2006-07-12 Thread Guy Fraser
On Mon, 2006-10-07 at 10:33 -0700, Karen Hill wrote: > Hello, > > How would one go about creating a US telephone type in the format of > "(555)-555-" ? I am at a loss on how it could be accomplished in > the most correct way possible while not going into the various > different country styles

Re: [GENERAL] US Telephone Number Type

2006-07-11 Thread Bruno Wolff III
On Mon, Jul 10, 2006 at 20:05:13 -0400, Chris Browne <[EMAIL PROTECTED]> wrote: > worse, over time. Fortunately LD rates have been tending to fall... Unless you call a country where the local phone company is charging userous rates andmay be giving kickbacks to people who can get people to call

Re: [GENERAL] US Telephone Number Type

2006-07-11 Thread Merlin Moncure
On 10 Jul 2006 10:33:52 -0700, Karen Hill <[EMAIL PROTECTED]> wrote: Hello, How would one go about creating a US telephone type in the format of "(555)-555-" ? I am at a loss on how it could be accomplished in the most correct way possible while not going into the various different country

Re: [GENERAL] US Telephone Number Type

2006-07-11 Thread Martijn van Oosterhout
On Tue, Jul 11, 2006 at 01:27:49AM -0400, Alvaro Herrera wrote: > But I think the main problem may be getting our calling conventions > right. I mean, how would you do a PG_GETARG_BOOL() or stuff like that? > Maybe if we offered PG_GETARG_DATUM and PG_RETURN_DATUM equivalents in > PL/Perl we cou

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Alvaro Herrera
Tom Lane wrote: > "Karen Hill" <[EMAIL PROTECTED]> writes: > > I did a quick google and someone mentioned that input and output > > functions need to be written in C. Is that still the case? > > Yeah, pretty much. The main problem is that such functions need to deal > with whatever physical on-d

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Tom Lane
"Karen Hill" <[EMAIL PROTECTED]> writes: > I did a quick google and someone mentioned that input and output > functions need to be written in C. Is that still the case? Yeah, pretty much. The main problem is that such functions need to deal with whatever physical on-disk format you've chosen for

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Chris Browne
[EMAIL PROTECTED] writes: > In California, we definitely care about the area code, as there are several > area codes (at least 4) in San Diego County. I have to use 1+area code to > dial home from work, and vice-versa. In what way do you care about them? The area code is NOT an accurate way of d

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Chris Browne
[EMAIL PROTECTED] (Richard Broersma Jr) writes: >> > Is the difficulty of creating a telephone type the reason it is not in >> > postgresql already? >> > >> > Should the telephone type be able to do something such as: >> > >> > SELECT * from tableFOO where telephone.areacode = 555; >> > >> > Or wou

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Browne wrote: > kleptog@svana.org (Martijn van Oosterhout) writes: [snip] > Attempts to evaluate terribly much based on area codes are > increasingly likely to fail... Especially with VoIP and number portability. - -- Ron Johnson, Jr. Jefferso

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Chris Browne
kleptog@svana.org (Martijn van Oosterhout) writes: > What makes it tricky is that people don't agree on how numbers > should be formatted. There is a relevant standard, E.164b, where US/Canadian telnos are formatted like: +1.4166734124 It should be quite clear how *any* phone number in those c

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Karen Hill
Tom Lane wrote: > It doesn't seem particularly hard to make a type that stores just the > digits (applying whatever amount of error-checking seems appropriate > on the non-digit stuff it's throwing away) and on output regurgitates > a standardized format. Minimum support would just be an input f

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Steve Crawford
Steve Atkins wrote: ... Should the telephone type be able to do something such as: SELECT * from tableFOO where telephone.areacode = 555; Maybe, but is that useful? Maybe America is different, but my experience in NL and AU is that you rarely care about the areacode anyway, so why would you w

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread SCassidy
Sent by: cc pgsql-general-own pgsql-general@postgresql.org [EMAIL PROTECTED] Subject Re: [GENERAL] US Tele

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Steve Atkins
On Jul 10, 2006, at 11:07 AM, Martijn van Oosterhout wrote: On Mon, Jul 10, 2006 at 10:33:52AM -0700, Karen Hill wrote: Hello, How would one go about creating a US telephone type in the format of "(555)-555-" ? I am at a loss on how it could be accomplished in the most correct way possib

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Tom Lane
"Karen Hill" <[EMAIL PROTECTED]> writes: > How would one go about creating a US telephone type in the format of > "(555)-555-" ? Are you sure that's what you want? Even within the US there's the issue of extension numbers; I'm not sure how useful it is to have a datatype that refuses anything

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Vivek Khera
On Jul 10, 2006, at 3:46 PM, Richard Broersma Jr wrote: Also, due to the problem of keeping area codes segregated in large growing population centers, there is strong talk about allowing overlapping area codes. Dialing locally will require 11 digits instead of the usual 7. around here

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Richard Broersma Jr
> > Is the difficulty of creating a telephone type the reason it is not in > > postgresql already? > > > > Should the telephone type be able to do something such as: > > > > SELECT * from tableFOO where telephone.areacode = 555; > > > > Or would regex be better? > > makes more sense to store them

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Jorge Godoy
"Karen Hill" <[EMAIL PROTECTED]> writes: > Hello, > > How would one go about creating a US telephone type in the format of > "(555)-555-" ? I am at a loss on how it could be accomplished in > the most correct way possible while not going into the various > different country styles e.g. +01 (5

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Vivek Khera
On Jul 10, 2006, at 1:33 PM, Karen Hill wrote: Is the difficulty of creating a telephone type the reason it is not in postgresql already? Should the telephone type be able to do something such as: SELECT * from tableFOO where telephone.areacode = 555; Or would regex be better? makes more s

Re: [GENERAL] US Telephone Number Type

2006-07-10 Thread Martijn van Oosterhout
On Mon, Jul 10, 2006 at 10:33:52AM -0700, Karen Hill wrote: > Hello, > > How would one go about creating a US telephone type in the format of > "(555)-555-" ? I am at a loss on how it could be accomplished in > the most correct way possible while not going into the various > different country

[GENERAL] US Telephone Number Type

2006-07-10 Thread Karen Hill
Hello, How would one go about creating a US telephone type in the format of "(555)-555-" ? I am at a loss on how it could be accomplished in the most correct way possible while not going into the various different country styles e.g. +01 (555) 555-. Is the difficulty of creating a teleph