===================================================================
RCS file: /projects/cvsroot/pgsql/src/include/catalog/pg_proc.h,v
retrieving revision 1.501
diff -c -r1.501 pg_proc.h
*** pg_proc.h 27 May 2008 00:13:09 -0000 1.501
--- pg_proc.h 29 May 2008 15:35:32 -0000
***************
*** 2202,2208 ****
DATA(insert OID = 937 ( substring PGNSP PGUID 12 1 0 f f t f i 2 25 "25 23" _null_ _null_ _null_ text_substr_no_len - _null_ _null_ ));
DESCR("return portion of string");
DATA(insert OID = 2087 ( replace PGNSP PGUID 12 1 0 f f t f i 3 25 "25 25 25" _null_ _null_ _null_ replace_text - _null_ _null_ ));
! DESCR("replace all occurrences of old_substr with new_substr in string");
DATA(insert OID = 2284 ( regexp_replace PGNSP PGUID 12 1 0 f f t f i 3 25 "25 25 25" _null_ _null_ _null_ textregexreplace_noopt - _null_ _null_ ));
DESCR("replace text using regexp");
DATA(insert OID = 2285 ( regexp_replace PGNSP PGUID 12 1 0 f f t f i 4 25 "25 25 25 25" _null_ _null_ _null_ textregexreplace - _null_ _null_ ));
--- 2202,2208 ----
DATA(insert OID = 937 ( substring PGNSP PGUID 12 1 0 f f t f i 2 25 "25 23" _null_ _null_ _null_ text_substr_no_len - _null_ _null_ ));
DESCR("return portion of string");
DATA(insert OID = 2087 ( replace PGNSP PGUID 12 1 0 f f t f i 3 25 "25 25 25" _null_ _null_ _null_ replace_text - _null_ _null_ ));
! DESCR("replace all occurrences in string of old_substr with new_substr");
DATA(insert OID = 2284 ( regexp_replace PGNSP PGUID 12 1 0 f f t f i 3 25 "25 25 25" _null_ _null_ _null_ textregexreplace_noopt - _null_ _null_ ));
DESCR("replace text using regexp");
DATA(insert OID = 2285 ( regexp_replace PGNSP PGUID 12 1 0 f f t f i 4 25 "25 25 25 25" _null_ _null_ _null_ textregexreplace - _null_ _null_ ));
The current wording implies that you replace arg1 with arg2 in arg3, but
replace actually replaces occurences of arg2 with arg3 in arg1. Attached
patch makes the function comment more closely resemble that, and is more
in-line with the docs wording as well.
--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
No comments:
Post a Comment