Re: Help needed with XMLTABLE

2020-04-15 Thread Pavel Stehule
st 15. 4. 2020 v 7:32 odesílatel Dilip Kumar napsal: > One of our customers tried to use XMLTABLE syntax without > row_expression, which works fine with ORACLE but doesn't work with > PostgreSQL. So can anyone suggest what alternative we can use? > > CREATE TABLE user_pool_clean ( > fk_user_

Re: Help needed with XMLTABLE

2020-04-15 Thread Pavel Stehule
st 15. 4. 2020 v 7:32 odesílatel Dilip Kumar napsal: > One of our customers tried to use XMLTABLE syntax without > row_expression, which works fine with ORACLE but doesn't work with > PostgreSQL. So can anyone suggest what alternative we can use? > > CREATE TABLE user_pool_clean ( > fk_user_

Re: Help needed with XMLTABLE

2020-04-15 Thread Dilip Kumar
On Wed, Apr 15, 2020 at 12:56 PM Pavel Stehule wrote: > st 15. 4. 2020 v 7:32 odesílatel Dilip Kumar napsal: >> >> One of our customers tried to use XMLTABLE syntax without >> row_expression, which works fine with ORACLE but doesn't work with >> PostgreSQL. So can anyone suggest what alternative

pg_restore: could not close data file: Success

2020-04-15 Thread Peter J. Holzer
I'm trying to restore a backup on a different machine and it terminates with the not really helpful messages: pg_restore: [directory archiver] could not close data file: Success pg_restore: [parallel archiver] a worker process died unexpectedly The backup was made with pg_dump --compress=5 -v -F

Re: pg_restore: could not close data file: Success

2020-04-15 Thread Peter J. Holzer
On 2020-04-15 12:01:46 +0200, Peter J. Holzer wrote: > I'm trying to restore a backup on a different machine and it terminates > with the not really helpful messages: > > pg_restore: [directory archiver] could not close data file: Success > pg_restore: [parallel archiver] a worker process died une

Re: pg_basebackup && long time storage of wal_archive/ content

2020-04-15 Thread Adrian Klaver
On 4/14/20 11:16 PM, Matthias Apitz wrote: El día Dienstag, April 14, 2020 a las 08:28:35 -0700, Adrian Klaver escribió: On 4/14/20 8:00 AM, Matthias Apitz wrote: Hello, The run (as user 'postgres') on the server of the cmd: pg_basebackup -U ${DBSUSER} -Ft -z -D /data/postgresql11/backup-w

GENERATED STORED columns and table rewrites?

2020-04-15 Thread Maciek Sakrejda
Hello, Does adding a GENERATED STORED column need to rewrite the table (like adding a column with a DEFAULT before 11)? Neither the ALTER TABLE docs [1] nor the generated column docs [2] discuss this. The former has a very nice Tip regarding DEFAULT columns--maybe we should clarify GENERATED STORE

timestamp and timestamptz

2020-04-15 Thread Niels Jespersen
Hello all We have some data that have entered a timestamp column from a csv. The data in the csv are in utc. We want to access the data in our native timezone (CET). I am considering a few alternatives: 1. Early in the process, convert to timestamptz and keep this datatype. 2. Ear

Re: timestamp and timestamptz

2020-04-15 Thread Magnus Hagander
On Wed, Apr 15, 2020 at 7:50 PM Niels Jespersen wrote: > Hello all > > > > We have some data that have entered a timestamp column from a csv. The > data in the csv are in utc. We want to access the data in our native > timezone (CET). > > > > I am considering a few alternatives: > > > > 1.

Re: timestamp and timestamptz

2020-04-15 Thread Steve Crawford
What is the exact format of the timestamp in the CSV? As long as it is in a "fully qualified" format, i.e. includes the time-zone offset, then you will have no problem as the data represents a point in time. It is easier to conceptualize "time stamp with time zone" (timestamptz) as actually repres

Re: timestamp and timestamptz

2020-04-15 Thread Steve Crawford
On Wed, Apr 15, 2020 at 11:06 AM Steve Crawford < scrawf...@pinpointresearch.com> wrote: > What is the exact format of the timestamp in the CSV? As long as it is in > a "fully qualified" format, i.e. includes the time-zone offset, then you > will have no problem as the data represents a point in t

Re: GENERATED STORED columns and table rewrites?

2020-04-15 Thread Michael Lewis
Yes, the system will do a full table rewrite to compute the value and store it. Unfortunately, I believe it is an access exclusive lock during that entire time.

Re: timestamp and timestamptz

2020-04-15 Thread Tim Cross
Niels Jespersen writes: > Hello all > > > > We have some data that have entered a timestamp column from a csv. The data > in the csv are in utc. We want to access the data in > our native timezone (CET). > > > > I am considering a few alternatives: > > > > 1. Early in the process

Re: timestamp and timestamptz

2020-04-15 Thread raf
Tim Cross wrote: > Niels Jespersen writes: > > > Hello all > > > > We have some data that have entered a timestamp column from a csv. The data > > in the csv are in utc. We want to access the data in > > our native timezone (CET). > > > > I am considering a few alternatives: > > > > 1.

Re: timestamp and timestamptz

2020-04-15 Thread David G. Johnston
On Wed, Apr 15, 2020 at 4:53 PM raf wrote: > I don't see much difference in storing a timestamptz in UTC or a > timestamptz > in CET. As long as the intended offset from UTC is recorded (which it is > in a timestamptz) it should be fine. > I only really skimmed the entire response but this frami

Re: pg_restore: could not close data file: Success

2020-04-15 Thread Kyotaro Horiguchi
Hello. Added -hackers. At Wed, 15 Apr 2020 12:14:25 +0200, "Peter J. Holzer" wrote in > On 2020-04-15 12:01:46 +0200, Peter J. Holzer wrote: > > I'm trying to restore a backup on a different machine and it terminates > > with the not really helpful messages: > > > > pg_restore: [directory arc

SV: timestamp and timestamptz

2020-04-15 Thread Niels Jespersen
Fra: Magnus Hagander Sendt: 15. april 2020 20:05 Til: Niels Jespersen Cc: pgsql-general@lists.postgresql.org Emne: Re: timestamp and timestamptz On Wed, Apr 15, 2020 at 7:50 PM Niels Jespersen mailto:n...@dst.dk>> wrote: Hello all We have some data that have entered a timestamp column from

Re: pg_restore: could not close data file: Success

2020-04-15 Thread Michael Paquier
On Thu, Apr 16, 2020 at 12:08:09PM +0900, Kyotaro Horiguchi wrote: > I'm surprised to find an old thread about the same issue. > > https://www.postgresql.org/message-id/20160307.174354.251049100.horiguchi.kyotaro%40lab.ntt.co.jp > > But I don't think it's not acceptable that use fake errno for gz