Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

CREATE FUNCTION which accepts LIST as argument

CREATE OR REPLACE FUNCTION search1(text[])
RETURNS SETOF company_regions AS $$
BEGIN
  RETURN QUERY SELECT * FROM company_regions
                 WHERE country_name = ANY($1);
END
$$ LANGUAGE plpgsql STABLE
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #CREATE #FUNCTION #accepts #LIST #argument
ADD COMMENT
Topic
Name
8+4 =