且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

postgres中没有目标数据的查询

更新时间:2023-11-25 21:43:34



begin

插入ConfigurationSetting(fbstime,sbstime,tbstime,Loc_Rep_time,Map_Ref_time,Store_in_cluster,Biker_speed,time_to_cover_distance)值(

1,ockquote>
2,

i have a table ConfigurationSetting which have some column like this


create table ConfigurationSetting(id serial, fbstime character varying(20),sbstime character varying(20), tbstime character varying(20),Loc_Rep_time character varying(20),Map_Ref_time character varying(20),Store_in_cluster character varying(20),Biker_speed character varying(20),time_to_cover_distance character varying(20))



now i want to create function that insert data into above table so fuction is look like this


create function ins_ConfigurationSetting(first_beat_start_time character varying(20),second_beat_start_time character varying(20),third_beat_start_time character varying(20),Loc_Rep_time character varying(20),Map_Ref_time character varying(20),Store_in_cluster character varying(20), Biker_speed character varying(20),time_to_cover_distance character varying(20))
returns void as $$
begin
insert into ConfigurationSetting (fbstime,sbstime,tbstime,Loc_Rep_time,Map_Ref_time,Store_in_cluster,Biker_speed,time_to_cover_distance)values($1,$2,$3,$4,$5,$6,$7,$8)
returning id;
end
$$ language 'plpgsql';


this function successfully run
but when i m calling function like this


select ins_ConfigurationSetting('09:52:33','04:50:33','12:00:00','16:20:00','23:00:00','40','20','03');

it show error that


query has no destination for result data


how to resolve that


begin
insert into ConfigurationSetting (fbstime,sbstime,tbstime,Loc_Rep_time,Map_Ref_time,Store_in_cluster,Biker_speed,time_to_cover_distance)values(


1,


2,