Re: Open 7.3 items - Mailing list pgsql-hackers

From Mike Mascari
Subject Re: Open 7.3 items
Date
Msg-id 3D5B57CA.C107E6EE@mascari.com
Whole thread Raw
In response to Re: Open 7.3 items  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Open 7.3 items  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Joe Conway wrote:
> 
> Hannu Krosing wrote:
> > What about functions
> >
> > 1. split(text,text,int) returns text
> >
> > 2. split(text,text) returns text[]
> >
> > and why not
> >
> > 3. split(text,text,text) returns text
> >
> > which returns text from $1 delimited by $2 and $3
> 
> Given the time remaining before beta, I'll be happy just to get #1 done.
> 
> I can see the utility of #2 (or perhaps even a table function which
> breaks the string into individual rows). I'm not sure I understand #3.
> 
> I am concerned about the name though -- only in that there are usually
> objections raised to function names that are too likely to conflict with
> user created function names. But "split" is good from the standpoint
> that it is used in other languages, so people should find it familiar.
> 
> Anyone have comments on the name?

Actually, I've been wondering if it wouldn't be a good idea with schemas
coming to think now about how to divide up namespaces for all sorts of
things, including PostgreSQL's built in functions, the contrib code,
etc. I think a naming scheme with which both PostgreSQL and the
community would comply, a la Java's reverse DNS scheme for namespaces
would be neat. So when a database is installed, the following schemas
are automatically created:

org.postgresql.system <- System tables and core functions
org.postgresql.text <- Text related functions
org.postgresql.math <- Math related functions
org.postgresql.fts <- Full-Text schema

or perhaps:

org.postgresql.contrib.fts <- Full-Text schema

etc.

I don't even know if "." is allowed in the schema names, but you get the
idea. Then, a users search_path (or whatever it's called, I haven't used
the development version in a while), would be the equivalent of Java's
"import" statement, or C++'s "using" statement. So "split" would be a
function in the org.postgresql.text schema.

How about them apples?

If this is an insane idea, its 3:32 A.M. my time ;-)

Mike Mascari
mascarm@mascari.com

> 
> Joe


pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: Open 7.3 items
Next
From: Oleg Bartunov
Date:
Subject: Re: tsearch bug in 7.2.1?