These are chat archives for ged/ruby-pg

31st
Jan 2017
Emiliano Heyns
@retorquere
Jan 31 22:03
How can I call a stored procedure through the pg gem? I have a function defined as create or replace function do_something(_client int, _task_nr int, _completed date, _cm real) returns void, but when I call it using DB.exec('select do_something($1, $2, $3, $4)', [client, task_nr, completed, cm]) I get Warning: no type cast defined for type "void" with oid 2278. Please cast this type explicitly to TEXT to be safe for future changes. Unexpected error while processing request: Body yielded non-string value {"client_add_waist_measurement"=>""}
Emiliano Heyns
@retorquere
Jan 31 22:21
Ugh sorry the Unexpected error is from Sinatra, ignore that, but there's still the "Please cast" message.