Skip to content

PLR Master + pg12beta2 + Mac OS X Mojave #65

@JamesInform

Description

@JamesInform

Hi Joseph,

I compiled PLR (Master) successfully on MacOs Mojave.
When I create the extension and try to create a function from the manual, I get the following error:

test=# create extension plr;
CREATE EXTENSION
test=# CREATE OR REPLACE FUNCTION r_max (integer, integer) RETURNS integer AS '
test'# if (arg1 > arg2)
test'# return(arg1)
test'# else
test'# return(arg2)
test'# ' LANGUAGE 'plr' STRICT;
psql: ERROR: R interpreter parse error
DETAIL: R parse error caught in "
if (arg1 > arg2)
return(arg1)
else
return(arg2)
".
test=#

But when I put the "else" directly after "return(arg1)" then everything is fine:

test=# CREATE OR REPLACE FUNCTION r_max (integer, integer) RETURNS integer AS '
test'# if (arg1 > arg2)
test'# return(arg1) else
test'# return(arg2)
test'# ' LANGUAGE 'plr' STRICT;
CREATE FUNCTION
test=#

Could it be that PLR extension has problems with line feeds?

On PostgreSQL 11 with PLR 8.4 everything works fine as expected!

James

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions