-- SEQUENCE: public.test_id_seq

-- DROP SEQUENCE public.test_id_seq;

CREATE SEQUENCE public.test_id_seq;

ALTER SEQUENCE public.test_id_seq
    OWNER TO comcardeuser;





-- Table: public.test

-- DROP TABLE public.test;

CREATE TABLE public.test
(
    id integer NOT NULL DEFAULT nextval('test_id_seq'::regclass),
    company_name character varying(100) COLLATE pg_catalog."default",
    CONSTRAINT test_pkey PRIMARY KEY (id)
)
WITH (
    OIDS = FALSE
)
TABLESPACE pg_default;

ALTER TABLE public.test
    OWNER to comcardeuser;



-- FUNCTION: public.insert_company(character varying)

-- DROP FUNCTION public.insert_company(character varying);

CREATE OR REPLACE FUNCTION public.insert_company(
	_name character varying)
    RETURNS void
    LANGUAGE 'plpgsql'

    COST 100
    VOLATILE
AS $BODY$

BEGIN
	INSERT into test(company_name) Values(_name);
END;

$BODY$;

ALTER FUNCTION public.insert_company(character varying)
    OWNER TO comcardeuser;
