I'm kinda new on Postgres, so I need your help for this one.
postgres=# select version();
version
------------------------------------------------------------
PostgreSQL 12.3, compiled by Visual C++ build 1914, 64-bit
(1 row)
1. CREATE PROCEDURE test (INT,varchar(200))
2. LANGUAGE plpgsql
3. AS $$
4. BEGIN
5.
6. create table test1 as
7. select id,name from mst_user_mobile limit 5
8.
9. COMMIT;
10. END;
11. $$;
From what I read, Postgres version above 10, support PROCEDURE method. But when I execute the code it always error on line 1 (on word PROCEDURE)
here error that i got:
ERROR: syntax error at or near "PROCEDURE"
LINE 1: CREATE PROCEDURE test (INT,varchar(200))
^
SQL state: 42601
Character: 8
any helps are welcome