SV: design partioning scheme for selecting from latest partition

2021-03-22 Thread Niels Jespersen
>Fra: Francisco Olarte >Sendt: 22. marts 2021 20:04 >Til: Niels Jespersen >Cc: pgsql-general@lists.postgresql.org >Emne: Re: design partioning scheme for selecting from latest partition > >Niels: > >On Mon, Mar 22, 2021 at 3:40 PM Niels Jespersen wrote: >... >> -- Then I want to be able to

Re: Binary encoding of timetz type

2021-03-22 Thread Kenneth Marshall
On Mon, Mar 22, 2021 at 08:11:55PM -0500, Merlin Moncure wrote: > Check out libpqtypes -- it has client side send/receive functions for > binary format you can crib from. > > https://github.com/pgagarinov/libpqtypes/blob/master/source/src/datetime.c > > merlin Hi, I just wanted to +1 the

Re: Binary encoding of timetz type

2021-03-22 Thread Merlin Moncure
On Tue, Mar 16, 2021 at 1:31 PM Ruslan wrote: > > Hi folks, > > Apologies if it's the wrong place to ask. I have a question for postgres > developers. > > I wrote parser for COPY binary encoding. Everything is great but one thing > worries me. It seems like the time offset field has reversed

Re: [E] Re: CSV From Oracle with timestamp column getting errors

2021-03-22 Thread Saha, Sushanta K
Awesome. Thanks Victor! Sushanta On Mon, Mar 22, 2021 at 4:47 PM Victor Yegorov wrote: > пн, 22 мар. 2021 г. в 21:38, Saha, Sushanta K < > sushanta.s...@verizonwireless.com>: > >> \COPY table1 FROM '/tmp/Oracle_2020_06.csv' DELIMITER ',' CSV HEADER; >> ERROR: invalid input syntax for

Re: CSV From Oracle with timestamp column getting errors

2021-03-22 Thread Tim Cross
"Saha, Sushanta K" writes: > \COPY table1 FROM '/tmp/Oracle_2020_06.csv' DELIMITER ',' CSV HEADER; > ERROR: invalid input syntax for type timestamp: "01-JUN-20 06.04.20.634000 > AM" > CONTEXT: COPY table1, line 2, column last_update_timestamp: "01-JUN-20 > 06.04.20.634000 AM" > The

Re: CSV From Oracle with timestamp column getting errors

2021-03-22 Thread Victor Yegorov
пн, 22 мар. 2021 г. в 21:38, Saha, Sushanta K < sushanta.s...@verizonwireless.com>: > \COPY table1 FROM '/tmp/Oracle_2020_06.csv' DELIMITER ',' CSV HEADER; > ERROR: invalid input syntax for type timestamp: "01-JUN-20 > 06.04.20.634000 AM" > CONTEXT: COPY table1, line 2, column

Re: CSV From Oracle with timestamp column getting errors

2021-03-22 Thread Saha, Sushanta K
The table column definition: Column | Type | ---++ last_update_timestamp | timestamp(6) without time zone | Thanks & Regards Sushanta On Mon, Mar 22, 2021 at 4:37 PM Saha, Sushanta K

CSV From Oracle with timestamp column getting errors

2021-03-22 Thread Saha, Sushanta K
\COPY table1 FROM '/tmp/Oracle_2020_06.csv' DELIMITER ',' CSV HEADER; ERROR: invalid input syntax for type timestamp: "01-JUN-20 06.04.20.634000 AM" CONTEXT: COPY table1, line 2, column last_update_timestamp: "01-JUN-20 06.04.20.634000 AM" Appreciate any help with this psql command. Thanks &

Re: design partioning scheme for selecting from latest partition

2021-03-22 Thread Francisco Olarte
Niels: On Mon, Mar 22, 2021 at 3:40 PM Niels Jespersen wrote: ... > version int not null, ... > ) partition by list (version); > > -- Add tens of partitions > -- Load millions of rows in each partition > -- Then I want to be able to do this wothout scanning all partitions for the > highest

gdal32-libs-3-2-2-13.rhel bad dependency

2021-03-22 Thread Edward Donahue III
It requires proj72 >= 8.0.0, needs to be proj80 -- Thank you, Ed Donahue III e...@eddonahue.com

design partioning scheme for selecting from latest partition

2021-03-22 Thread Niels Jespersen
Hello I have a table partitioned like this drop table if exists s cascade; create table s ( version int not null, a int, b int ) partition by list (version); -- Add tens of partitions -- Load millions of rows in each partition -- Then I want to be able to do this wothout

Re: More than one UNIQUE key when matching items..

2021-03-22 Thread Ron Clarke
Hey thanks for working out a solution to this deceptive problem. One of those you expect to be simple, but then all of a sudden it isn't. Best regards Ron On Sat, 20 Mar 2021 at 19:01, Allan Kamau wrote: > > > > > > > On Sat, Mar 20, 2021 at 6:52 PM Ron Clarke wrote: > >> /* >> I'm

Re: More than one UNIQUE key when matching items..

2021-03-22 Thread Ron Clarke
Thank you, simple, and effective. Got sucked into trying to use a named constraint. Best regards Ron On Sat, 20 Mar 2021 at 20:00, Laurenz Albe wrote: > On Sat, 2021-03-20 at 15:51 +, Ron Clarke wrote: > > In SQL Server this is easy, we insert the records into a temporary table > with

Re: Need help on query optimization

2021-03-22 Thread Saurabh Agrawal
> > > Here B is a ltree column, E is a jsonb column. > It may also help to mention the indexes and their types. eg. Does column B have a GiST index? > > EXPLAIN ANALYZE SELECT * FROM A > > where ( B <@ 'INDIA' ) AND C = 'D' > > AND CAST ( E->'F'->'G'->>'H' AS DATE ) >= '2021-02-01' > > AND

Re: PITR for an only object in postgres

2021-03-22 Thread Kyotaro Horiguchi
At Thu, 18 Mar 2021 17:12:49 -0400, aslı cokay wrote in > Hi all, > > Is there any way to get for example a table version of 5 minutes ago, or we > should PITR to 5 minutes ago, dump the table and restore with this dump ? If you want to revert the recent changes on the table, I think there's

Re: questions about wraparound

2021-03-22 Thread Luca Ferrari
On Sat, Mar 20, 2021 at 12:07 PM Luca Ferrari wrote: > I suspect freezing is doing it "totally" for a idatistemplate > database, even if I don't understand why. I can confirm that freezing a template database is done by means of setting it age to zero. I've set the datistempalte flag for testdb

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-22 Thread Michael Paquier
On Mon, Mar 22, 2021 at 09:25:26AM +0200, Andrus wrote: > Errors in pg_wal directory seems not to occur in patched version. Errors in > pg_stat_tmp still occur. Yesterdays log introduces new error message > > using stale statistics instead of current ones because stats collector is > not

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-22 Thread Andrus
Hi! Errors in pg_wal directory seems not to occur in patched version. Errors in pg_stat_tmp still occur. Yesterdays log introduces new error message using stale statistics instead of current ones because stats collector is not responding 2021-03-21 03:02:23 EET stats collector LOG: 

Need help on query optimization

2021-03-22 Thread Shubham Mittal
Hi Team, I am trying to execute the below query and getting below explain plan in postgres . Please provide any inputs on the same , on how to optimize the same. Here B is a ltree column, E is a jsonb column. EXPLAIN ANALYZE SELECT * FROM A where ( B <@ 'INDIA' ) AND C = 'D' AND CAST (