Revision e8041cc6
Von Moritz Bunkus vor fast 11 Jahren hinzugefügt
sql/Pg-upgrade2/requirement_spec_items_update_trigger_fix2.sql | ||
---|---|---|
-- children. item_id is the ID of the item that needs to be updated
|
||
-- (or NULL if the requirement spec itself must be updated/a section
|
||
-- was changed).
|
||
CREATE OR REPLACE FUNCTION update_requirement_spec_item_time_estimation(item_id INTEGER, item_requirement_spec_id INTEGER) RETURNS BOOLEAN AS $$
|
||
|
||
-- This function must be dropped manually because PostgreSQL cannot
|
||
-- rename function parameters with 'CREATE OR REPLACE FUNCTION ...'
|
||
-- anymore.
|
||
DROP FUNCTION update_requirement_spec_item_time_estimation(item_id INTEGER, requirement_spec_id INTEGER);
|
||
CREATE FUNCTION update_requirement_spec_item_time_estimation(item_id INTEGER, item_requirement_spec_id INTEGER) RETURNS BOOLEAN AS $$
|
||
DECLARE
|
||
current_row RECORD;
|
||
new_row RECORD;
|
Auch abrufbar als: Unified diff
Pflichtenhefte: PL/PgSQL-Funktion erst droppen, dann anlegen, wenn Parameter umbenannt werden
Ältere PostgreSQL-Versionen konnten auch mit einem 'CREATE OR REPLACE
FUNCTION...' noch Funktionsparameter umbenennen. Das können neuere
nicht mehr. Daher zuerst droppen und dann anlegen.