Re: order of pg_dump command "create sequence" - Mailing list pgsql-admin

From David G. Johnston
Subject Re: order of pg_dump command "create sequence"
Date
Msg-id CAKFQuwYXJ11+wMu-qrLi9yQwZYjDsgJH=h6aStyxcHti=gYC+g@mail.gmail.com
Whole thread Raw
In response to order of pg_dump command "create sequence"  (Антон Глушаков <a.glushakov86@gmail.com>)
Responses Re: order of pg_dump command "create sequence"
Re: order of pg_dump command "create sequence"
List pgsql-admin
On Friday, June 6, 2025, Антон Глушаков <a.glushakov86@gmail.com> wrote:

/* create a function that will move the sequence */
CREATE FUNCTION public.gen_id() RETURNS character varying
LANGUAGE sql IMMUTABLE AS
$$
SELECT 'PREFIX_'||nextval('public.my_seq'::regclass)::VARCHAR;
$$;



Stating immutable is a lie and the breakage is on your head for violating using only immutable functions in generated expressions.

David J.

pgsql-admin by date:

Previous
From: Антон Глушаков
Date:
Subject: order of pg_dump command "create sequence"
Next
From: Ron Johnson
Date:
Subject: Re: order of pg_dump command "create sequence"