Field | Old Value | New Value |
---|---|---|
Description | PostgreSQL verions 8.4 added paramter default value assignment. Need to provide support for extraction & scripting of this information for functions. |
PostgreSQL verions 8.4 added paramter default value assignment. Need to provide support for extraction & scripting of this information for functions. Online Documentation: https://www.postgresql.org/docs/8.4/static/sql-createfunction.html |
Examples:
DROP FUNCTION "public"."isdate" (integer, integer, varchar, date, int) GO DROP FUNCTION "public"."isdate1" (integer, integer, varchar, date, int) GO CREATE FUNCTION "public"."isdate" ( in a integer, in "b DEFAULT name" integer default 10, in c varchar default 't''est', in d date default current_date, inout e integer default 1 ) RETURNS integer AS 'select $1 + $2;' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT; GO CREATE FUNCTION "public"."isdate1" ( in a integer, in "b DEFAULT name" integer default 10, in c varchar default 't''est', in d date default current_date, inout e integer default 1 ) RETURNS integer AS 'select $1 + $2;' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
Field | Old Value | New Value |
---|---|---|
Fixed Build | v18.0.0-beta-20 | |
Resolution | Fixed | |
Resolved Date | Dec 7, 2016 5:41 PM | |
Status | New | Resolved |
Extraction and scripting has been enhanced so that the parameter default values are now supported. This data is not in a friendly format in the catalog tables. We are using pg_get_function_arguments(oid) to get the string value of all params with default info contained. Will then tokenize the value and extract the default value that matches the column info and add it to the column extraction. These default values are only scripted when the function create statement is requested and not in the drop statement.
Extraction and scripting has been enhanced so that the parameter default values are now supported. This data is not in a friendly format in the catalog tables. We are using pg_get_function_arguments(oid) to get the string value of all params with default info contained. Will then tokenize the value and extract the default value that matches the column info and add it to the column extraction. These default values are only scripted when the function create statement is requested and not in the drop statement.
I have back ported the code to version 17.
I have back ported the code to version 17.
Field | Old Value | New Value |
---|---|---|
QA Assignee | JennyNishimura (Jenny Nishimura) | tariqrahiman (Tariq Rahiman) |
fixes to handle parameters without names. fixes to handle names differing by only a blank space at end
Committed revision: 52167
fixes to handle parameters without names. fixes to handle names differing by only a blank space at end
Committed revision: 52167
should be able to handle parameters with and without names
should be able to handle parameters with and without names
Field | Old Value | New Value |
---|---|---|
Status | Resolved | Verified |
Field | Old Value | New Value |
---|---|---|
Status | Verified | Closed |
Issue #14859 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v18.0.0-beta-20 |
No time estimate |
Examples: