Pass UUID value as a parameter to the function
问题 I have the table with some columns: --table create table testz ( ID uuid, name text ); Note : I want to insert ID values by passing as a parameter to the function. Because I am generating the ID value in the front end by using uuid_generate_v4() . So I need to pass the generated value to the function to insert into the table My bad try: --function CREATE OR REPLACE FUNCTION testz ( p_id varchar(50), p_name text ) RETURNS VOID AS $BODY$ BEGIN INSERT INTO testz values(p_id,p_name); END; $BODY$