syntax error at or near "$"
instantgis opened this issue · 3 comments
Copy paste SQL as is into PgAdmin4...
Tried ...
select * from public.pg_get_tabledef('public','age_group', true);
Seems to get expected table create...
NOTICE: (10)tabledef so far: CREATE TABLE public.age_group (
id bigint GENERATED BY DEFAULT AS IDENTITY NOT NULL,
name text NOT NULL,
min integer NULL,
max integer NULL,
CONSTRAINT age_group_pkey PRIMARY KEY (id),
CONSTRAINT age_group_name_key UNIQUE (name)
) TABLESPACE pg_default;
But then...
ERROR: line=PL/pgSQL function pg_get_tabledef(character varying,character varying,boolean,tabledefs[]) line 616 at EXECUTE. 42601. syntax error at or near "$"
CONTEXT: PL/pgSQL function pg_get_tabledef(character varying,character varying,boolean,tabledefs[]) line 627 at RAISE
SQL state: P0001
Version is...
"PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit"
A supabase instance.
Please try running again with latest code in verbose mode and see what the last message says before the error. It might be a searchpath syntax thang.
closing since no response