postgresql/src/include/catalog
Bruce Momjian 81186865fe Joe Conway wrote:
> Hannu Krosing wrote:
 >
 >> It seems that my last mail on this did not get through to the list
 >> ;(
 >>
 >> Please consider renaming the new builtin function
 >> split(text,text,int)
 >>
 >> to something else, perhaps
 >>
 >> split_part(text,text,int)
 >>
 >> (like date_part)
 >>
 >> The reason for this request is that 3 most popular scripting
 >> languages (perl, python, php) all have also a function with similar
 >> signature, but returning an array instead of single element and the
 >> (optional) third argument is limit (maximum number of splits to
 >> perform)
 >>
 >> I think that it would be good to have similar function in (some
 >> future release of) postgres, but if we now let in a function with
 >> same name and arguments but returning a single string instead an
 >> array of them, then we will need to invent a new and not so easy to
 >> recognise name for the "real" split function.
 >>
 >
 > This is a good point, and I'm not opposed to changing the name, but
 > it is too bad your original email didn't get through before beta1 was
 >  rolled. The change would now require an initdb, which I know we were
 >  trying to avoid once beta started (although we could change it
 > without *requiring* an initdb I suppose).
 >
 > I guess if we do end up needing an initdb for other reasons, we
 > should make this change too. Any other opinions? Is split_part an
 > acceptable name?
 >
 > Also, if we add a todo to produce a "real" split function that
 > returns an array, similar to those languages, I'll take it for 7.4.

No one commented on the choice of name, so the attached patch changes
the name of split(text,text,int) to split_part(text,text,int) per
Hannu's recommendation above. This can be applied without an initdb if
current beta testers are advised to run:

   update pg_proc set proname = 'split_part' where proname = 'split';

in the case they want to use this function. Regression and doc fix is
also included in the patch.

Joe Conway
2002-09-12 00:21:25 +00:00
..
catalog.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
catname.h pg_cast table, and standards-compliant CREATE/DROP CAST commands, plus 2002-07-18 23:11:32 +00:00
catversion.h Update catversion so we are sure everyone gets the bytea LIKE fix. 2002-09-02 06:24:15 +00:00
dependency.h pgindent run. 2002-09-04 20:31:48 +00:00
duplicate_oids Remove all traces of multibyte and locale options. Clean up comments 2002-09-03 21:45:44 +00:00
heap.h pgindent run. 2002-09-04 20:31:48 +00:00
index.h Second phase of committing Rod Taylor's pg_depend/pg_constraint patch. 2002-07-12 18:43:19 +00:00
indexing.h pgindent run. 2002-09-04 20:31:48 +00:00
namespace.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_aggregate.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_am.h Implement CREATE/DROP OPERATOR CLASS. Work still remains: need more 2002-07-29 22:14:11 +00:00
pg_amop.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_amproc.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_attrdef.h Use the dependency mechanism to manage column defaults. We need this 2002-07-15 16:33:32 +00:00
pg_attribute.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_cast.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_class.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_constraint.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_control.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_conversion.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_database.h Remove all traces of multibyte and locale options. Clean up comments 2002-09-03 21:45:44 +00:00
pg_depend.h Second phase of committing Rod Taylor's pg_depend/pg_constraint patch. 2002-07-12 18:43:19 +00:00
pg_description.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_group.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_index.h Code review and documentation updates for indisclustered patch. 2002-09-03 01:04:41 +00:00
pg_inherits.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_language.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_largeobject.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_listener.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_namespace.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_opclass.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_operator.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_proc.h Joe Conway wrote: 2002-09-12 00:21:25 +00:00
pg_rewrite.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_shadow.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_statistic.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_trigger.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_type.h pgindent run. 2002-09-04 20:31:48 +00:00
pg_version.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
unused_oids