Hi,
What is the correct INSERT statement syntax to insert a composite type into a table of that type. For example given the following table:
CREATE TABLE licencee
(
id integer NOT NULL DEFAULT nextval('licencee_id_seq'::regclass),
email character varying(254),
salutation character varying(20),
first_name character varying(256),
middle_name character varying(256),
last_name character varying(256),
suffix character varying(20),
locale character varying(20),
business_name character varying(256),
CONSTRAINT licencee_pkey PRIMARY KEY (id )
)
WITH (
OIDS=FALSE
)
How can I write an INSERT procedure like:
CREATE FUNCTION create_licencee(new_licencee licencee) RETURNS boolean AS $$
BEGIN
INSERT INTO licencee new_licencee;
RETURN true;
END;
$$ LANGUAGE plpgsql;
Do I have to fully qualify each column name? It would seem redundant in this case.
Thanks,
Grant