dbflute / dbflute-core

DBFlute core libraries for Java8
http://dbflute.seasar.org/
23 stars 18 forks source link

DBFlute Engine: ReplaceSchema dropping overload functions on PostgreSQL #192

Closed jflute closed 4 months ago

jflute commented 8 months ago

cannot get arguments correctly (can get arguments of both functions)

-- #df:begin#
create or replace function FN_OVERLOAD_SAME_NAME(targetDate in date, months in integer) returns date
    language plpgsql
as
$$
begin
    return targetDate + (months::text || ' month')::interval;
end;
$$;
-- #df:end#

-- #df:begin#
create or replace function FN_OVERLOAD_SAME_NAME(targetTimestamp in timestamp with time zone, months in integer) returns date
    language plpgsql
as
$$
begin
    return targetTimestamp + (months::text || ' month')::interval;
end;
$$;
-- #df:end#
String catalog = rs.getString("FUNCTION_CAT");
String schema = rs.getString("FUNCTION_SCHEM");
String procedure = rs.getString("FUNCTION_NAME");
ResultSet columnRs = metaData.getFunctionColumns(catalog, schema, procedure, null);
maihamadb.public.fn_noname_arg_overload
  returnValue(4) date(null, null, null) dataType=91 // null
  targetdate(1) date(null, null, null) dataType=91 // null
  months(1) int4(null, null, null) dataType=4 // null
  returnValue(4) date(null, null, null) dataType=91 // null
  targetdate(1) timestamptz(null, null, null) dataType=93 // null
  months(1) int4(null, null, null) dataType=4 // null

maihamadb.public.fn_noname_arg_overload
  returnValue(4) date(null, null, null) dataType=91 // null
  targetdate(1) date(null, null, null) dataType=91 // null
  months(1) int4(null, null, null) dataType=4 // null
  returnValue(4) date(null, null, null) dataType=91 // null
  targetdate(1) timestamptz(null, null, null) dataType=93 // null
  months(1) int4(null, null, null) dataType=4 // null
jflute commented 8 months ago

SPECIFIC_NAME of getFunctions():

maihamadb.public.fn_overload_same_name // fn_overload_same_name_24598
  returnValue(4) date(null, null, null) dataType=91, position=0 // fn_overload_same_name_24598: null
  targetdate(1) date(null, null, null) dataType=91, position=1 // fn_overload_same_name_24598: null
  months(1) int4(null, null, null) dataType=4, position=2 // fn_overload_same_name_24598: null
  returnValue(4) date(null, null, null) dataType=91, position=0 // fn_overload_same_name_24599: null
  targettimestamp(1) timestamptz(null, null, null) dataType=93, position=1 // fn_overload_same_name_24599: null
  months(1) int4(null, null, null) dataType=4, position=2 // fn_overload_same_name_24599: null
maihamadb.public.fn_overload_same_name // fn_overload_same_name_24599
  returnValue(4) date(null, null, null) dataType=91, position=0 // fn_overload_same_name_24598: null
  targetdate(1) date(null, null, null) dataType=91, position=1 // fn_overload_same_name_24598: null
  months(1) int4(null, null, null) dataType=4, position=2 // fn_overload_same_name_24598: null
  returnValue(4) date(null, null, null) dataType=91, position=0 // fn_overload_same_name_24599: null
  targettimestamp(1) timestamptz(null, null, null) dataType=93, position=1 // fn_overload_same_name_24599: null
  months(1) int4(null, null, null) dataType=4, position=2 // fn_overload_same_name_24599: null