Re: Cloning schemas - Mailing list pgsql-general

From Łukasz Jarych
Subject Re: Cloning schemas
Date
Msg-id CAGv31od+cuXFttW4FmVGPBJBvjbNBpwgeuhNKfDmqLGqyQMY-Q@mail.gmail.com
Whole thread Raw
In response to Re: Cloning schemas  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Cloning schemas  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Hi,

"
Strange. "audit_sq" looks like an invalid sequence table. I went here, https://www.postgresql.org/docs/9.6/static/sql-createsequence.html, and checked all the way back to version 7.1 and "maxvalue" has been a column since back then.

Maybe skip that table for now? It even says the last value is 1. You should also check the other sequence tables. You can get them by doing:

select * from information_schema.sequences;"

Result of select:

image.png

Are you sure that I can skip " audit_sq" seq? 

I wrote here because i am newbie and i can not update this. Hope for your help Guys.

Best,
Jacek







pon., 2 lip 2018 o 15:30 Tom Lane <tgl@sss.pgh.pa.us> napisał(a):
Łukasz Jarych <jaryszek@gmail.com> writes:
> I am trying to use :

> "select * from clone_schema('public','Version8',true) but i am getting
> error:

> "Column "max_value" does not exist.
> LINE 1: SELECT last_value, max_value, start_value, increment_by, min...
> HINT: Maybe you wanted to point to column " "audit_sq.last_value"?
> QUERY: SELECT last_value, max_value, start_value, increment_by, min_value,
> cache_value, log_cnt, is_cycled, is_called FROM public.audit_sq;
> CONTEXT: function PL/pgSQL clone_schema(text,text,boolean), row 66 in
> EXECUTE

I guess audit_sq is a sequence?  It looks to me like this function has
not been taught about the changes in sequence metadata in PG v10.
You need to update it, or talk to its author about an update.

                        regards, tom lane
Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cloning schemas
Next
From: Adrian Klaver
Date:
Subject: Re: Cloning schemas