Re: SELECT col INTO TEMP TABLE tab2 ON COMMIT DROP FROM tab1

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: SELECT col INTO TEMP TABLE tab2 ON COMMIT DROP FROM tab1
Date: 2016-08-12 10:43:59
Message-ID: CAADeyWim8aiW9RJ3JynB4wU3vjGizKEGSpZJUvZ386NcUMqz9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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;

Regards
Alex

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2016-08-12 11:08:12 Re: SELECT col INTO TEMP TABLE tab2 ON COMMIT DROP FROM tab1
Previous Message Karsten Hilbert 2016-08-12 09:32:43 Re: Postgres Pain Points 2 ruby / node language drivers