On 12 August 2016 at 18:43, Alexander Farber <alexander.farber@xxxxxxxxx> wrote:
Thank you, I have rewritten it into:BEGIN
PERFORM check_positions(in_uid, in_gid, in_tiles);
CREATE TEMP TABLE _words(word varchar, score integer) ON COMMIT DROP;
INSERT INTO _words
SELECT
out_word AS word,
max(out_score) AS score
FROM check_words(in_uid, in_gid, in_tiles)
GROUP BY word, gid;
Or use CREATE TABLE ... AS SELECT ...
That's the SQL-standard spelling anyway.