limits, indexes, views and query planner

2022-08-15 Thread Marc Mamin
to exclude the table_b earlier in its plan and to possibly fallback to a plan equivalent to the first one. with a view on a single table (test_av), the index is used. An oddity in the plan is the expected row count in "Append"(11) ... ( tested on postgres 14 ) Regards, Marc Mami

removing "serial" from table definitions.

2021-06-24 Thread Marc Mamin
s on that difference. best regards, Marc Mamin

RE: removing "serial" from table definitions.

2021-06-24 Thread Marc Mamin
From: Joe Conway [mailto:m...@joeconway.com] >Sent: Donnerstag, 24. Juni 2021 14:47 >To: Marc Mamin ; pgsql-general > >Subject: Re: removing "serial" from table definitions. > >On 6/24/21 8:33 AM, Marc Mamin wrote: >> Hi, >> >> Is there a way to c

RE: removing "serial" from table definitions.

2021-06-24 Thread Marc Mamin
t;It's 'nextval('admin.db_jobs_history_id_seq'::regclass)' on source and >'nextval('db_jobs_history_id_seq'::regclass)' on target. I've probably found the origin of our problem: https://www.postgresql.org/docs/9.3/release-8-1.html => Add proper dependencies for arguments of sequence functions (Tom) But I won't be able to check that in the next few days.. best regards, marc Mamin

schema prefixes in default values (was RE: removing "serial" from table definitions).

2021-06-28 Thread Marc Mamin
Marc Mamin writes: > > Yes, I undersand that serial is just a hint at table creation time, but is > > there a place in catalog where we can see if the table was created using > > 'serial' ? > > No. Where the docs say "these are equivalent", they mea

What is the best way to redefine a trigger? (lock issue)

2021-12-10 Thread Marc Mamin
uch a lock, thanks, Marc Mamin here an example of a such a deployment/migration script, all of these scripts are applied sequentially in separate transactions: === SET client_min_messages=error; CREATE OR REPLACE FUNCTION block_item_cancel() RETURNS TRIGGER AS $BOD

RE: What is the best way to redefine a trigger? (lock issue)

2021-12-10 Thread Marc Mamin
hment, that the lock exists without any other apparent conflicting session. >Do you need to drop/create the trigger or a CREATE OR REPLACE function would suffice? There are different use cases. Sometimes I only need to drop a trigger or modify its definition (not the function) &

RE: What is the best way to redefine a trigger? (lock issue)

2021-12-10 Thread Marc Mamin
> >-Original Message- >From: Achilleas Mantzios >Sent: Freitag, 10. Dezember 2021 11:36 >To: pgsql-general@lists.postgresql.org >Subject: Re: What is the best way to redefine a trigger? (lock issue) > >On 10/12/21 12:2