Fwd: SQL

Started by Łukasz Jarychover 7 years ago2 messagesbugs
Jump to latest
#1Łukasz Jarych
jaryszek@gmail.com

Hi Guys,

i want to report a bug.
Please read emails above.

Let me know what you need else from me,

Best,
Jacek

---------- Forwarded message ---------
From: Łukasz Jarych <jaryszek@gmail.com>
Date: pt., 13 lip 2018 o 16:44
Subject: Re: SQL
To: Melvin Davidson <melvin6925@gmail.com>

Hi Melvin,

thank you very much !!

AA great, i am going to vacation also this week :)
where can i report this bug ?

And i do not know if i can explain this very well....

Best,
Jacek

pt., 13 lip 2018 o 16:41 Melvin Davidson <melvin6925@gmail.com> napisał(a):

Show quoted text

*Jacek,*

*In answer to your question "sequences are the same and causing problems.
Maybe there is a way to change them ?*
*Like newCreatedSchemaName_*
*CopiedSequance?" The function already is coded to do that. *

*See the
code vvvv *

* EXECUTE 'CREATE SEQUENCE ' || quote_ident(dest_schema) || '.' ||
quote_ident(object) || ' AS ' || sq_typname || ' INCREMENT
' || sq_increment_by || ' MINVALUE ' || sq_min_value || '
MAXVALUE ' || sq_max_value || ' START WITH ' || sq_start_value
|| ' CACHE ' || sq_cache_value || seq_cycled;*

* The problem is caused by the following statement: *
*CREATE TABLE melvin.t_audittrail (LIKE test.t_audittrail INCLUDING ALL);*

*which fails with:*
* ERROR: MINVALUE (1) must be less than MAXVALUE (-1) *

*However, that SHOULD NOT happen because the table does NOT reference any
sequence.*
*So the problem is a PostgreSQL 10 bug!*

*Please report this bug and include the table structure, as I will be
going on vacation for a week.*

On Fri, Jul 13, 2018 at 3:12 AM, Łukasz Jarych <jaryszek@gmail.com> wrote:

Hi Melvin,

i dumped test database.
Your function is working but sequences are the same and causing problems.
Maybe there is a way to change them ?
Like newCreatedSchemaName_CopiedSequance?

Thank you very much for help!

Best,
Jacek

czw., 12 lip 2018 o 16:36 Łukasz Jarych <jaryszek@gmail.com> napisał(a):

Hi Melvin,

i will change data to show you.

Another problem is that constraints in one schema are the same in the
second schema - i was trying to delete record from public table but
constraint was on test schema table and i got the error:

"you can not delete because you are violating constraints"

Best,
Jacek

czw., 12 lip 2018 o 15:49 Melvin Davidson <melvin6925@gmail.com>
napisał(a):

so this is working fine. But after runing function sequances in new

schema are not working...

Jacek,

In that case, in order to fix the problem, I will need you to send me
the data as below.

pg_dump -U postgres -F p -n your_source_schema yourdb >
schema_dump.sql

--
*Melvin Davidson*
*Maj. Database & Exploration Specialist*
*Universe Exploration Command – UXC*
Employment by invitation only!

--
*Melvin Davidson*
*Maj. Database & Exploration Specialist*
*Universe Exploration Command – UXC*
Employment by invitation only!

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Łukasz Jarych (#1)
Re: Fwd: SQL

=?UTF-8?Q?=C5=81ukasz_Jarych?= <jaryszek@gmail.com> writes:

i want to report a bug.

This looks closely related to a bug that was fixed in 10.4.
What PG version are you on?

Please read emails above.

It's fairly impolite to expect people to reverse-engineer a bug
description from a long and rather disjointed thread. In future,
please write a self-contained description, and include necessary
information such as your exact PG version.

https://wiki.postgresql.org/wiki/Guide_to_reporting_problems

regards, tom lane