Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2014
    Posts
    2

    Unanswered: function result type must be character varying because of OUT parameters

    I am trying to compile the following function , getting an error as "function result type must be character varying because of OUT parameters", Please let me know how to correct this:
    create or replace function fn_exec_stage_data_upload
    (
    p_date in date,
    p_position_out out varchar
    )
    returns integer as $$
    declare

    l_exit boolean;
    l_process_code varchar(10);
    l_sysdate date;
    l_ret numeric;

    begin
    l_process_code := 'MRKSTGUP';

    l_ret := 1;
    l_ret := ibsuplpkg.fn_pop_all_internal_info; -- populate from stage
    if l_ret <> 0 then
    p_position_out := 'STG_TO_INT';
    return 1;
    end if;

    l_ret := 1;
    l_ret := agnupldpkg .fn_build_agenda_master ; -- create agenda
    if l_ret <> 0 then
    p_position_out := 'AGN_UPLD';
    return 1;
    end if;

    l_ret := 1;
    l_ret := egautilpkg.fn_create_agents_auto_till ('O',p_date); -- create opening till
    if l_ret <> 0 then
    p_position_out := 'AGENT_TILL_CREATE';
    return 1;
    end if;

    p_position_out := 'SUCCESS';

    return 0;
    exception
    when others then
    errpkg.pr_dbg('AG',l_process_code,'E',' In WO of fn_exec_stage_data_upload..'||sqlerrm);
    return 1;
    end ;
    $$ language plpgsql;

  2. #2
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    What version of Pervasive PSQL are you using? That function declaration doesn't look like supported syntax.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  3. #3
    Join Date
    Nov 2014
    Posts
    2
    Quote Originally Posted by mirtheil View Post
    What version of Pervasive PSQL are you using? That function declaration doesn't look like supported syntax.
    I am using 9.3.5 ver

  4. #4
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    Sounds like you're using PostgreSQL not Pervasive PSQL. You should probably post in the PostgreSQL forum.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •