title: column table_name of relation table_name does not exist
body: <p>My project using Postgresql and Microsoft SQL Server. So I can't change the parameter name in Postgresql. How can I fix the bug in this case.</p>
  <p>my function below.</p>
  <pre><code>CREATE OR REPLACE FUNCTION schedule_updatealarmsetting(
      userno integer,
      isemail boolean,
      isalarmi boolean,
      ispc boolean,
      ismobile boolean,
      timealarm integer,
      isunuse boolean)
    RETURNS void AS
  $BODY$ 
  BEGIN
      -- check exists
      if(exists(select 1 from ScheduleAlarmSetting A where A.UserNo = Schedule_UpdateAlarmSetting.UserNo)) then
      begin
          -- update
          update ScheduleAlarmSetting 
          set IsEmail = Schedule_UpdateAlarmSetting.IsEmail
          , ScheduleAlarmSetting.IsAlarmi = Schedule_UpdateAlarmSetting.IsAlarmi
          , ScheduleAlarmSetting.IsPC = Schedule_UpdateAlarmSetting.IsPC
          , ScheduleAlarmSetting.TimeAlarm = Schedule_UpdateAlarmSetting.TimeAlarm 
          , ScheduleAlarmSetting.IsMobile = Schedule_UpdateAlarmSetting.IsMobile
          , ScheduleAlarmSetting.IsUnuse = Schedule_UpdateAlarmSetting.IsUnuse
          , ScheduleAlarmSetting.ModDate = now()
          , ScheduleAlarmSetting.ModUserNo = Schedule_UpdateAlarmSetting.UserNo
          where ScheduleAlarmSetting.UserNo = Schedule_UpdateAlarmSetting.UserNo;
      end;
      else
      begin
          -- insert
          insert into ScheduleAlarmSetting(UserNo,IsEmail,IsAlarmi,IsPC,IsMobile, TimeAlarm, IsUnuse,RegUserNo,RegDate)
          values (Schedule_UpdateAlarmSetting.UserNo
          , Schedule_UpdateAlarmSetting.IsEmail
          , Schedule_UpdateAlarmSetting.IsAlarmi
          , Schedule_UpdateAlarmSetting.IsPC
          , Schedule_UpdateAlarmSetting.IsMobile
          , Schedule_UpdateAlarmSetting.TimeAlarm
          , Schedule_UpdateAlarmSetting.IsUnuse
          , Schedule_UpdateAlarmSetting.UserNo
          , now());
      end;
      end if;
  END;
  $BODY$
    LANGUAGE plpgsql VOLATILE
    COST 100;
  ALTER FUNCTION schedule_updatealarmsetting(integer, boolean, boolean, boolean, boolean, integer, boolean)
    OWNER TO postgres;
  
  
  select * from schedule_updatealarmsetting(1,True, True, True, True,0,false);
  </code></pre>
  <p>Error
  column &quot;schedulealarmsetting&quot; of relation &quot;schedulealarmsetting&quot; does not exist</p>
  <p>When I remove &quot;schedulealarmsetting.&quot; it will show error:&quot;column reference &quot;userno&quot; is ambiguous&quot;</p>