[GENERAL] Replacing an existing unique constraint (not UNIQUE INDEX) with primary key

2016-12-20 Thread Andreas Joseph Krogh
Hi all.   For historical reasons I have a table which at first had an "id"-column (the PK) and later got an "entity_id"-column (which is a UNIQUE CONSTRAINT).   I'm now trying to get rid of the "id"-column and make the "entity_id"-column the new PK. The tricky part is that both of these columns a

Re: [GENERAL] Replacing an existing unique constraint (not UNIQUE INDEX) with primary key

2016-12-20 Thread Achilleas Mantzios
On 20/12/2016 11:43, Andreas Joseph Krogh wrote: Hi all. For historical reasons I have a table which at first had an "id"-column (the PK) and later got an "entity_id"-column (which is a UNIQUE CONSTRAINT). I'm now trying to get rid of the "id"-column and make the "entity_id"-column the new PK. T

Re: [GENERAL] Replacing an existing unique constraint (not UNIQUE INDEX) with primary key

2016-12-20 Thread Andreas Joseph Krogh
På tirsdag 20. desember 2016 kl. 11:02:27, skrev Achilleas Mantzios < ach...@matrix.gatewaynet.com >: On 20/12/2016 11:43, Andreas Joseph Krogh wrote: [snip] BEGIN; ALTER TABLE person ADD CONSTRAINT person_pk PRIMARY KEY (entity_id); alter table person drop c

Re: [GENERAL] Replacing an existing unique constraint (not UNIQUE INDEX) with primary key

2016-12-20 Thread Achilleas Mantzios
On 20/12/2016 12:27, Andreas Joseph Krogh wrote: På tirsdag 20. desember 2016 kl. 11:02:27, skrev Achilleas Mantzios mailto:ach...@matrix.gatewaynet.com>>: On 20/12/2016 11:43, Andreas Joseph Krogh wrote: [snip] BEGIN; ALTER TABLE person ADD CONSTRAINT person_pk PRIMARY KEY (e

Re: [GENERAL] Replacing an existing unique constraint (not UNIQUE INDEX) with primary key

2016-12-20 Thread Andreas Joseph Krogh
På tirsdag 20. desember 2016 kl. 11:42:56, skrev Achilleas Mantzios < ach...@matrix.gatewaynet.com >: On 20/12/2016 12:27, Andreas Joseph Krogh wrote: På tirsdag 20. desember 2016 kl. 11:02:27, skrev Achilleas Mantzios < ach...@matrix.gatewaynet.com

Re: [GENERAL] Replacing an existing unique constraint (not UNIQUE INDEX) with primary key

2016-12-20 Thread Adrian Klaver
On 12/20/2016 03:03 AM, Andreas Joseph Krogh wrote: På tirsdag 20. desember 2016 kl. 11:42:56, skrev Achilleas Mantzios mailto:ach...@matrix.gatewaynet.com>>: On 20/12/2016 12:27, Andreas Joseph Krogh wrote: På tirsdag 20. desember 2016 kl. 11:02:27, skrev Achilleas Mantzios mailto:

Re: [GENERAL] pgAdmin 4 - auto disconnect

2016-12-20 Thread Paolo Saudin
Thank you very much, I will try this approach Paolo 2016-12-19 15:30 GMT+01:00 Melvin Davidson : > > On Mon, Dec 19, 2016 at 7:28 AM, Paolo Saudin > wrote: > >> Hi, >> >> I deployed pgAdmin4 on a server and I have a script that every day >> restore a database from a dump file. The problem I am f

Re: [GENERAL] pg_repack and Postgres versions > 9.4

2016-12-20 Thread Gaetano Mendola
I wonder why this is not a VACUUM option. On Fri, 16 Dec 2016 at 15:30 Kenneth Marshall wrote: > On Fri, Dec 16, 2016 at 09:15:51AM -0500, Bill Moran wrote: > > > > Does anyone have experience using pg_repack on Postgres versions > 9.4? > > Specifically 9.5, but probably 9.6 at some point. > > >

Re: [GENERAL] pg_repack and Postgres versions > 9.4

2016-12-20 Thread Alvaro Herrera
Gaetano Mendola wrote: > I wonder why this is not a VACUUM option. Because nobody has written the patch. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-general mailing list (pgsql-general@po

[GENERAL] How well does PostgreSQL 9.6.1 support unicode?

2016-12-20 Thread James Zhou
Unicode has evolved from version 1.0 with 7,161 characters released in 1991 to version 9.0 with 128,172 characters released in June 2016. My questions are - which version of Unicode is supported by PostgreSQL 9.6.1? - what does "supported" exactly mean? simply store it? comparison? sorting? substri

Re: [GENERAL] How well does PostgreSQL 9.6.1 support unicode?

2016-12-20 Thread John R Pierce
On 12/20/2016 4:41 PM, James Zhou wrote: - PostgreSQL 9.6.1 only supports a subset of unicode characters in BMP. Is there any documents defining which subset is fully supported? I believve its support is based on what the OS native runtime libraries support. -- john r pierce, recycling bit

Re: [GENERAL] How well does PostgreSQL 9.6.1 support unicode?

2016-12-20 Thread Peter Devoy
The comments in here may be of help: https://github.com/postgres/postgres/blob/master/src/include/mb/pg_wchar.h Kind regards Peter -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How well does PostgreSQL 9.6.1 support unicode?

2016-12-20 Thread Tom Lane
James Zhou writes: > - *But their sorting order seems to be undefined. Can anyone comment > the sorting rules?* Well, it would depend on lc_collate, which you have not told us, and it would also depend on how well your platform's strcoll() function implements that collation; but you h

Re: [GENERAL] pg_repack and Postgres versions > 9.4

2016-12-20 Thread Kyotaro HORIGUCHI
At Tue, 20 Dec 2016 20:32:19 +, Gaetano Mendola wrote in > I wonder why this is not a VACUUM option. > > On Fri, 16 Dec 2016 at 15:30 Kenneth Marshall wrote: > > > On Fri, Dec 16, 2016 at 09:15:51AM -0500, Bill Moran wrote: > > > > > > Does anyone have experience using pg_repack on Postgr

Re: [GENERAL] How well does PostgreSQL 9.6.1 support unicode?

2016-12-20 Thread James Zhou
both lc_type and lc_collate are en_US.UTF-8. Sorry for missing them in the original post. I understand that collate has impact on sorting order, but the fact that char_length() is not returning the correct length in char for certain characters (non-BMP) is an indication that unicode is not fully s

Re: [GENERAL] How well does PostgreSQL 9.6.1 support unicode?

2016-12-20 Thread Kyotaro HORIGUCHI
Hello, At Tue, 20 Dec 2016 16:41:51 -0800, James Zhou wrote in > Unicode has evolved from version 1.0 with 7,161 characters released in 1991 > to version 9.0 with 128,172 characters released in June 2016. My questions > are > - which version of Unicode is supported by PostgreSQL 9.6.1? > - what