Re: [GENERAL] pg_dump not dropping event trigger

2017-07-23 Thread Greg Atkins
Tom, would you like a bug report to track this? On Sat, Jul 22, 2017 at 07:00:03PM -0400, Tom Lane wrote: > Greg Atkins writes: > > I have a DB with an event trigger, which I am dumping with > > pg_dump -Fc --no-acl --no-owner [db_name] > [dump_file] > > > In my dump file, I can't find any DROP

[GENERAL] Perfomance of IN-clause with many elements and possible solutions

2017-07-23 Thread dilaz03 .
Hello. I have database with events with type from different souces identified by id. I have query which filters events by IN-clause with many ids (1-500 ids). I see poor perfomance of IN-clause and try to investigate this problem. SELECT version();

Re: [GENERAL] pg_dump not dropping event trigger

2017-07-23 Thread Tom Lane
Greg Atkins writes: > would you like a bug report to track this? No, it's already dealt with. In any case, your original email was good enough --- we track bugs these days more by message-ID than anything else. regards, tom lane -- Sent via pgsql-general mailing list

Re: [GENERAL] pg_dump not dropping event trigger

2017-07-23 Thread Michael Paquier
On Sun, Jul 23, 2017 at 5:48 PM, Tom Lane wrote: > Greg Atkins writes: >> would you like a bug report to track this? > > No, it's already dealt with. In any case, your original email was good > enough --- we track bugs these days more by message-ID than anything else. This has been fixed by the

[GENERAL] What is the problem with this query?

2017-07-23 Thread Igor Korot
Hi, ALL, draft=# IF NOT EXISTS( SELECT 1 FROM pg_class c, pg_namespace n WHERE n.oid = c.relnamespace AND c.relname = 'abcattbl_tnam_ownr' AND n.nspname = 'public' ) THEN CREATE INDEX "abcattbl_tnam_ownr" ON "abcattbl"("abt_tnam" ASC, "abt_ownr" ASC); ERROR: syntax error at or near "IF" LINE 1: I

Re: [GENERAL] What is the problem with this query?

2017-07-23 Thread David G. Johnston
On Sunday, July 23, 2017, Igor Korot wrote: > > Is "IF" operator not supported by PostgreSQL > IF is pl/pgsql, not SQL. David J.

Re: [GENERAL] What is the problem with this query?

2017-07-23 Thread Igor Korot
Hi, David, On Sun, Jul 23, 2017 at 5:07 PM, David G. Johnston wrote: > On Sunday, July 23, 2017, Igor Korot wrote: >> >> Is "IF" operator not supported by PostgreSQL So how do I write this properly? Thank you. > > > IF is pl/pgsql, not SQL. > > David J. -- Sent via pgsql-general mailing li

Re: [GENERAL] What is the problem with this query?

2017-07-23 Thread Christoph Moench-Tegeder
## Igor Korot (ikoro...@gmail.com): > >> Is "IF" operator not supported by PostgreSQL > So how do I write this properly? There is documentation for that: https://www.postgresql.org/docs/current/static/sql-createindex.html Regards, Christoph -- Spare Space -- Sent via pgsql-general mailing l

Re: [GENERAL] What is the problem with this query?

2017-07-23 Thread Igor Korot
Hi, Christoph, On Sun, Jul 23, 2017 at 5:30 PM, Christoph Moench-Tegeder wrote: > ## Igor Korot (ikoro...@gmail.com): > >> >> Is "IF" operator not supported by PostgreSQL >> So how do I write this properly? > > There is documentation for that: > https://www.postgresql.org/docs/current/static/sql-

Re: [GENERAL] Perfomance of IN-clause with many elements and possible solutions

2017-07-23 Thread PT
On Sun, 23 Jul 2017 14:35:24 +0300 "dilaz03 ." wrote: > Hello. > > I have database with events with type from different souces identified by > id. I have query which filters events by IN-clause with many ids (1-500 > ids). I see poor perfomance of IN-clause and try to investigate this > problem.

Re: [GENERAL] What is the problem with this query?

2017-07-23 Thread David G. Johnston
On Sunday, July 23, 2017, Igor Korot wrote: > Hi, David, > > On Sun, Jul 23, 2017 at 5:07 PM, David G. Johnston > > wrote: > > On Sunday, July 23, 2017, Igor Korot > > wrote: > >> > >> Is "IF" operator not supported by PostgreSQL > > So how do I write this properly? > > CREATE FUNCTION or a DO bl