> 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
creation to world, but disallow temp table creation in template1. Per
latest round of pghackers discussion.
I did not force initdb, but the permissions lockdown on template1 will
not take effect unless you do one (or manually REVOKE TEMP ON DATABASE template1 FROM public).
Gerhard Hintermayer, revised and documented by Tom Lane.
This patch also fixes a 'must fix' bug: libpgtcl's LISTEN/NOTIFY
support was broken by the recent changes to the PGnotify structure.
Guess that change wasn't quite so safe as we thought.
< o -ALTER TABLE ALTER COLUMN SET/DROP NOT NULL (Christopher Kings-Lynne)
< o ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence
> o -ALTER TABLE ALTER COLUMN SET/DROP NOT NULL (Christopher)
200a200,201
> o ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence because
> of the item above
232c233
< o -Disallow missing columns in INSERT ... VALUES, per ANSI
> o -Disallow missing columns in INSERT ... (col) VALUES, per ANSI
335,336d335
< * Have SERIAL generate non-colliding sequence names when we have
< auto-destruction
< * Allow logging of query durations
> * -Allow logging of query durations
51,52d50
< * Make single-user local access permissions the default by limiting
< permissions on the socket file (Peter E)
72,73c70,71
< * Reserve last few process slots for super-user if max_connections reached
< * Add GUC parameter to print queries that generate errors
> * -Reserve last few process slots for super-user if max_connections reached
> * -Add GUC parameter to print queries that generate errors
82,83c80,81
< * Declare typein/out functions in pg_proc with a special "C string" data type
< * Functions returning sets do not totally work
> * -Declare typein/out functions in pg_proc with a special "C string" data type
> * -Functions returning sets do not totally work
90c88
< * Allow bytea to handle LIKE with non-TEXT patterns
> * -Allow bytea to handle LIKE with non-TEXT patterns
94c92
< o Store binary-compatible type information in the system
> o -Store binary-compatible type information in the system
97d94
< o -SELECT col FROM tab WHERE numeric_col = 10.1 fails, requires quotes
102c99
< o Ensure we have array-eq operators for every built-in array type
> o -Ensure we have array-eq operators for every built-in array type
119d115
< * Allow setting database character set without multibyte enabled
152d147
< * Have UPDATE/DELETE clean out indexes
198,199d192
< o ALTER TABLE ADD COLUMN to inherited table put column in wrong place
< [inheritance]
201d193
< o Add ALTER FUNCTION
203,204c195,196
< o -ALTER TABLE ADD PRIMARY KEY (Tom)
< o -ALTER TABLE ADD UNIQUE (Tom)
> o -ALTER TABLE ADD PRIMARY KEY (Christopher)
> o -ALTER TABLE ADD UNIQUE (Christopher)
248c240
< o -Remove SET KSQO option now that OR processing is improved (Tom)
> o -Remove SET KSQO option now that OR processing is improved (Bruce)
280c272
< * Have pg_dump use LEFT OUTER JOIN in multi-table SELECTs
> * -Have pg_dump use LEFT OUTER JOIN in multi-table SELECTs
287d278
< * Add config file check for $ODBCINI, $HOME/.odbc.ini, installpath/etc/odbc.ini
318,322d308
< * ODBC
< o ODBC 3.0 support
< o Unicode(UCS-2) support
< o Updatable cursors support
<
337c323
< * Fix foreign key constraints to not error on intermediate db states (Stephan)
> * -Fix foreign key constraints to not error on intermediate db states (Stephan)
352c338
< * Propagate column or table renaming to foreign key constraints
> * -Propagate column or table renaming to foreign key constraints
447c433
< * Remove wal_files postgresql.conf option because WAL files are now recycled
> * -Remove wal_files postgresql.conf option because WAL files are now recycled
460c446
< * Improve dynamic memory allocation by introducing tuple-context memory
> * -Improve dynamic memory allocation by introducing tuple-context memory
463c449
< * Nested FULL OUTER JOINs don't work (Tom)
> * -Nested FULL OUTER JOINs don't work (Tom)
> * -Add OR REPLACE clauses to non-FUNCTION object creation
> * -Allow autocommit so always in a transaction block
> * -Cache most recent query plan(s) (Neil) [prepare]
not synonymous with CHECK (xxx IS NOT NULL) -- for example, consider
ALTER TABLE ADD PRIMARY KEY, which checks for 'NOT NULL', not a check
constraint.
Neil Conway
already fixed by You. However there were a few left and attached patch
should fix the rest of them.
I used StringInfo only in 2 places and both of them are inside debug
ifdefs. Only performance penalty will come from using strlen() like all
the other code does.
I also modified some of the already patched parts by changing
snprintf(buf, 2 * BUFSIZE, ... style lines to
snprintf(buf, sizeof(buf), ... where buf is an array.
Jukka Holappa
(overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask,
per earlier discussion. Simplify scheme for overlaying fields in tuple
header (no need for cmax to live in more than one place). Don't try to
clear infomask status bits in tqual.c --- not safe to do it there. Don't
try to force output table of a SELECT INTO to have OIDs, either. Get rid
of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which
has already caused one recent failure. Improve documentation.