PostgreSQL
 sql >> Database >  >> RDS >> PostgreSQL

scartare l'array postgresql in righe

Usa disannidare. Ad esempio:

CREATE OR REPLACE FUNCTION test( p_test text[] )
  RETURNS void AS
$BODY$
BEGIN
  SELECT id FROM unnest( p_test ) AS id;
END;
$BODY$
  LANGUAGE plpgsql IMMUTABLE
  COST 1;