git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: d30292b) | patch
Split array_push into separate array_append and array_prepend functions.
2015年2月19日 01:53:14 +0000 (20:53 -0500)
2015年2月19日 01:53:33 +0000 (20:53 -0500)
commit 56a79a869bedc4bf6c35853642694cc0b0594dd2
Split array_push into separate array_append and array_prepend functions.

There wasn't any good reason for a single C function to implement both
these SQL functions: it saved very little code overall, and it required
significant pushups to re-determine at runtime which case applied. Redoing
it as two functions ends up with just slightly more lines of code, but it's
simpler to understand, and faster too because we need not repeat syscache
lookups on every call.

An important side benefit is that this eliminates the only case in which
different aliases of the same C function had both anyarray and anyelement
arguments at the same position, which would almost always be a mistake.
The opr_sanity regression test will now notice such mistakes since there's
no longer a valid case where it happens.
src/backend/utils/adt/array_userfuncs.c diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/pg_proc.h diff | blob | blame | history
src/include/utils/array.h diff | blob | blame | history
src/test/regress/expected/opr_sanity.out diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /