Pavel Stehule escribió: > you code can be translated to > > CREATE OR REPLACE > FUNCTION GROUP_CONCAT_ATOM(field1 TEXT, field2 TEXT, delimiter TEXT) > RETURNS TEXT AS $$ > BEGIN > RETURN COALESCE(field1||delimiter||field2, field2, field1); > END; > $$ LANGUAGE plpgsql;
Actually you don't even need plpgsql for this, do you .. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general