Invalid operation when creating Stored Procedure

0

Questions Similar to this : https://repost.aws/questions/QUp2M_5mszQu6q8CHjbqVHkA/invalid-operation-when-creating-stored-procedure

I am trying to write a stored procedure but facing the very same error as in the above link. My Redshift cluster is an updated version :

PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.41881

Please help

akc_adi
asked 2 years ago206 views
1 Answer
0

Hi,

Are you trying to create the stored procedure via SQL Workbench/J? If yes, what is the version of the JDBC driver? I have just tried to create the following sample stored procedure via SQL Workbench/J and it was created successfully. Redshift cluster version 1.0.41881 and JDBC 4.2 version 2.1.0.9

CREATE OR REPLACE PROCEDURE test_sp1(f1 int, f2 varchar)
AS $$
BEGIN
  RAISE INFO 'f1 = %, f2 = %', f1, f2;
END;
$$ LANGUAGE plpgsql;

Thanks,

AWS
EXPERT
Ziad
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions