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

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To:
Cc: 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 09:00:10
Message-ID: CAADeyWgZ=KLQGXfhU6xEa-F8FPUQutQR_xdkALmyDMcm+VP_rg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Francisco, thanks, but -

On Fri, Aug 12, 2016 at 10:47 AM, Francisco Olarte <folarte(at)peoplecall(dot)com>
wrote:

>
> https://www.postgresql.org/docs/9.5/static/plpgsql-
> statements.html#PLPGSQL-STATEMENTS-SQL-ONEROW
>
>
but the custom function I am trying to call (from another function) does
not return one row, but several rows, which I'd like to store into a temp
table:

SELECT
out_word AS word,
max(out_score) AS score
INTO TEMP TABLE _words ON COMMIT DROP
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 Francisco Olarte 2016-08-12 09:05:33 Re: SELECT col INTO TEMP TABLE tab2 ON COMMIT DROP FROM tab1
Previous Message Andreas Joseph Krogh 2016-08-12 08:58:05 Re: Postgres Pain Points 2 ruby / node language drivers