Thank you Craig, this has worked in my custom function too:
BEGIN
PERFORM check_positions(in_uid, in_gid, in_tiles);
CREATE TEMP TABLE _words ON COMMIT DROP AS
SELECT
out_word AS word,
max(out_score) AS score
FROM check_words(in_uid,
On 12 August 2016 at 18:43, Alexander Farber
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
>
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
2016-08-12 11:00 GMT+02:00 Alexander Farber :
> Francisco, thanks, but -
>
> On Fri, Aug 12, 2016 at 10:47 AM, Francisco Olarte > wrote:
>
>>
>> https://www.postgresql.org/docs/9.5/static/plpgsql-statement
>> s.html#PLPGSQL-STATEMENTS-SQL-ONEROW
>>
>>
> but the custom function I am trying to call
Alexander:
On Fri, Aug 12, 2016 at 11:00 AM, Alexander Farber
wrote:
> 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:
This I know, I wasn't trying to solve the problem. I was just trying
Francisco, thanks, but -
On Fri, Aug 12, 2016 at 10:47 AM, Francisco Olarte
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
On Fri, Aug 12, 2016 at 10:41 AM, Alexander Farber
wrote:
> why does this syntax fail in 9.5.3 please?
Maybe because...
> $func$ LANGUAGE plpgsql;
... you are writing pspgsql.
> The doc https://www.postgresql.org/docs/9.5/static/sql-selectinto.html just
But are looking at the docs for
Good morning,
why does this syntax fail in 9.5.3 please?
I am trying to call 2 custom functions from a third one with:
CREATE OR REPLACE FUNCTION play_game(
IN in_uid integer,
IN in_gid integer,
IN in_tiles jsonb,
OUT out_gid integer)
RETURNS integer AS
$f