ERROR: syntax error at or near "DETERMINISTIC" LINE 4: NOT DTERMINISTIC

[expired user #10168]'s profile image [expired user #10168] posted 8 years ago in General Permalink

Hello,

I am trying to write my first function in HeidiSQL 9.3.0.4984 in a postgres db.

Below is the top part of my function that I created using the GUI inputs. Below it have a long function with many IF THENs.

However, when I press save I receive this message: ERROR: syntax error at or near "DETERMINISTIC" LINE 4: NOT DTERMINISTIC

Do you know what's causing this error?

Thanks!

CREATE FUNCTION "getDate"("ss" TEXT, "it" INTEGER, "lt" TEXT, "sd" DATE) RETURNS DATE LANGUAGE SQL NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT E'' $$

[expired user #10168]'s profile image [expired user #10168] posted 8 years ago Permalink

Sorry, this line should read: ERROR: syntax error at or near "DETERMINISTIC" LINE 4: NOT DETERMINISTIC

Can anyone offer any insight? I can't move past this error

Hello,

I am trying to write my first function in HeidiSQL 9.3.0.4984 in a postgres db.

Below is the top part of my function that I created using the GUI inputs. Below it have a long function with many IF THENs.

However, when I press save I receive this message: ERROR: syntax error at or near "DETERMINISTIC" LINE 4: NOT DTERMINISTIC

Do you know what's causing this error?

Thanks!

CREATE FUNCTION "getDate"("ss" TEXT, "it" INTEGER, "lt" TEXT, "sd" DATE) RETURNS DATE LANGUAGE SQL NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT E'' $$

[expired user #10168]'s profile image [expired user #10168] posted 8 years ago Permalink

Here's a fake example:

CREATE FUNCTION "hi"("name" TEXT) RETURNS TEXT LANGUAGE SQL NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT E'' BEGIN

DECLARE hello

END

I get the same DETERMINISTIC error. Can anyone help?

ansgar's profile image ansgar posted 8 years ago Permalink

The routine editor is not yet supporting PostgreSQL fully.

[expired user #10168]'s profile image [expired user #10168] posted 8 years ago Permalink

The routine editor is not yet supporting PostgreSQL fully. Hi ansgar, do you know if this has been fixed yet? I would love to be able to create a function

ansgar's profile image ansgar posted 8 years ago Permalink

No, this has not been fixed yet. The routine editor is suitable for reading and displaying most (not all) properties of a PostgreSQL procedure, but not yet for editing these.

Please login to leave a reply, or register at first.