Re: Question on postgresql.conf

2018-07-30 Thread David G. Johnston
On Monday, July 30, 2018, Alvaro Aguayo Garcia-Rada wrote: > > As far as I know, it's not currently possible. > That would be incorrect, you just need to change server startup commands. https://www.postgresql.org/docs/10/static/runtime-config-file-locations.html David J.

RE: Question on postgresql.conf

2018-07-30 Thread Alvaro Aguayo Garcia-Rada
Hi. As far as I know, it's not currently possible. Maybe recompiling, but that could not be the best for production environment. I suppose this is this way becuase postgres is designed to expect a certain folder structure for it's data folder, and configuration files are considered part of it.

Question on postgresql.conf

2018-07-30 Thread Lu, Dan
Hello PostgreSQL Support Admin, My name is Dan Lu. I am fairly new to PostgreSQL. I have experience working with Oracle/MySQL database. I am going through the PostgreSQL manual and came across a question hoping you can help me. It appears the "postgresql.conf" file is needed by default to

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread David Rowley
On 31 July 2018 at 11:11, Melvin Davidson wrote: >> If you want stability use information_schema which we'll try very hard to >> not ever break. > Of course. Would you be so kind as to point out where in the > information_schema it > indicates if a table has a primary key or not. Oh wait, now I

Re: Cosmetically-varying casts added to view definitions

2018-07-30 Thread Adrian Klaver
On 07/30/2018 04:57 PM, Ken Tanzer wrote: On Mon, Jul 30, 2018 at 4:52 PM Adrian Klaver > wrote: On 07/30/2018 04:29 PM, Ken Tanzer wrote: > On Mon, Jul 30, 2018 at 4:10 PM Adrian Klaver mailto:adrian.kla...@aklaver.com> > Thanks Adrian.  I

Re: Cosmetically-varying casts added to view definitions

2018-07-30 Thread Ken Tanzer
On Mon, Jul 30, 2018 at 4:52 PM Adrian Klaver wrote: > On 07/30/2018 04:29 PM, Ken Tanzer wrote: > > On Mon, Jul 30, 2018 at 4:10 PM Adrian Klaver > > Thanks Adrian. I do have what are supposed to be the original view > > definitions, but I'm less than 100% confident they are accurate and > >

Re: Cosmetically-varying casts added to view definitions

2018-07-30 Thread Adrian Klaver
On 07/30/2018 04:29 PM, Ken Tanzer wrote: On Mon, Jul 30, 2018 at 4:10 PM Adrian Klaver Thanks Adrian.  I do have what are supposed to be the original view definitions, but I'm less than 100% confident they are accurate and up-to-date, which is why I thought to use the actual definitions as

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread David G. Johnston
On Mon, Jul 30, 2018 at 4:11 PM, Melvin Davidson wrote: > *Random atavistic things? I hardly think relhaspkey is random. It's been > there since version 7.2.* > *Exactly how does keeping it around slow you/us down?* > My recap of the discussion thread: That this has been around for a long time

Re: Cosmetically-varying casts added to view definitions

2018-07-30 Thread Ken Tanzer
On Mon, Jul 30, 2018 at 4:10 PM Adrian Klaver wrote: > On 07/30/2018 02:26 PM, Ken Tanzer wrote: > > > This doesn't impair the view's functionality, so I can't necessarily > > complain. But it does make it harder for me to know if the views were > > recreated correctly. I'd be curious to know

Re: Design of a database table

2018-07-30 Thread Adrian Klaver
On 07/30/2018 07:37 AM, hmidi slim wrote: I'm trying to design a database table. First of all there are two alternatives: 1-) Divide the table into two tables and make a join. 2-) Design a single table. 1rst alternative: Create table data_periods( id serial primary key not null, period

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread Andres Freund
Hi, On 2018-07-30 19:11:34 -0400, Melvin Davidson wrote: > *Of course. Would you be so kind as to point out where in the > information_schema it * > *indicates if a table has a primary key or not. Oh wait, now I > remember...no place.* As Adrian pointed out, that's wrong. It's in

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread Adrian Klaver
On 07/30/2018 04:11 PM, Melvin Davidson wrote: On Mon, Jul 30, 2018 at 6:21 PM, Andres Freund > wrote: Hi, On 2018-07-30 17:21:25 -0400, Melvin Davidson wrote: > * >it has never been the case that relhaspkey meant that the table > *currently* has

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread Melvin Davidson
On Mon, Jul 30, 2018 at 6:21 PM, Andres Freund wrote: > Hi, > > On 2018-07-30 17:21:25 -0400, Melvin Davidson wrote: > > * >it has never been the case that relhaspkey meant that the table > > *currently* has a primary key. * > > > *Hmmm, I guess it's a lot harder to fix "squishy semantics"from >

Re: Cosmetically-varying casts added to view definitions

2018-07-30 Thread Adrian Klaver
On 07/30/2018 02:26 PM, Ken Tanzer wrote: Hi.  As background/context, I'm working on a script to take a series of databases and make them timezone-aware.  This basically involves saving all the view definitions, dropping all the views, changing all the timestamp columns without time zones to

Re: alter table docs

2018-07-30 Thread Tom Lane
Rob Sargent writes: > Exactly.  That that is in the "box" made me think a similar blurb for > the non-index version should be there also. This seems to have been fixed in v11 but not back-patched. regards, tom lane

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread Andres Freund
Hi, On 2018-07-30 17:21:25 -0400, Melvin Davidson wrote: > * >it has never been the case that relhaspkey meant that the table > *currently* has a primary key. * > *Hmmm, I guess it's a lot harder to fix "squishy semantics"from "True > if the table has (or once had) a primary key" to

Re: alter table docs

2018-07-30 Thread Rob Sargent
OK, I was expecting a block in the enclosing text-area for this simple form of the command similar to the one for the /using_index/ form.  I suppose the existence of the latter lead me to expect the former.  If it's as intended I'm fine with that. Aah I see, you where referring to: "and

Re: alter table docs

2018-07-30 Thread Adrian Klaver
On 07/30/2018 02:24 PM, Rob Sargent wrote: On 07/30/2018 03:07 PM, Adrian Klaver wrote: On 07/30/2018 09:57 AM, Rob Sargent wrote: I was just looking up alter table add constraint syntax under "current(10)" and we get     ADD /table_constraint/ [ NOT VALID ]     ADD

Cosmetically-varying casts added to view definitions

2018-07-30 Thread Ken Tanzer
Hi. As background/context, I'm working on a script to take a series of databases and make them timezone-aware. This basically involves saving all the view definitions, dropping all the views, changing all the timestamp columns without time zones to TS with TZ, and then recreating all the views.

Re: alter table docs

2018-07-30 Thread Rob Sargent
On 07/30/2018 03:07 PM, Adrian Klaver wrote: On 07/30/2018 09:57 AM, Rob Sargent wrote: I was just looking up alter table add constraint syntax under "current(10)" and we get     ADD /table_constraint/ [ NOT VALID ]     ADD /table_constraint_using_index/ There is a description

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread Melvin Davidson
* >it has never been the case that relhaspkey meant that the table *currently* has a primary key. * *Hmmm, I guess it's a lot harder to fix "squishy semantics"from "True if the table has (or once had) a primary key" to"True if the table has a primary key after vacuum"rather than

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread Adrian Klaver
On 07/30/2018 07:42 AM, Melvin Davidson wrote: On Mon, Jul 30, 2018 at 10:31 AM, Tom Lane > wrote: Melvin Davidson mailto:melvin6...@gmail.com>> writes: > In the release notes for Version 11 Beta, under changes, I see these scary > remarks: >

Re: alter table docs

2018-07-30 Thread Adrian Klaver
On 07/30/2018 09:57 AM, Rob Sargent wrote: I was just looking up alter table add constraint syntax under "current(10)" and we get     ADD /table_constraint/ [ NOT VALID ]     ADD /table_constraint_using_index/ There is a description below for the using_index version but none for

Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-30 Thread Adrian Klaver
On 07/30/2018 10:33 AM, vardenis pavardenis wrote: 2018-07-30 16:51 GMT+03:00 Adrian Klaver >: On 07/30/2018 12:40 AM, vardenis pavardenis wrote: hello. thats interesting. maybe you have clue why it happened (i tried install by

Strange behavior with missing column in SQL function

2018-07-30 Thread Marcelo Lacerda
Here's the code that reproduces the behavior: http://paste.debian.net/1035412/ I have already discussed this in the IRC channel but there doesn't seem to be a consensus on whether this is a bug here's a brief transcript of RhodiumToad's opinion: > this isn't new, goes back to 9.1 at least >

Re: logical replication snapshots

2018-07-30 Thread Dimitri Maziuk
On 07/27/2018 05:20 PM, Adrian Klaver wrote: > On 07/27/2018 03:04 PM, Dimitri Maziuk wrote: >> ... but if I did the publication for ALL, I could just use streaming >> replication ... > > Well I was just showing the extremes from a single table publication to > ALL tables. You can also do

Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-30 Thread vardenis pavardenis
2018-07-30 16:39 GMT+03:00 Adrian Klaver : > On 07/30/2018 12:40 AM, vardenis pavardenis wrote: > > hello. >> thats interesting. >> maybe you have clue why it happened (i tried install by instructions) and >> how to fix it? :) >> > > Purge the existing packages and try installing again. > Did it

Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-30 Thread vardenis pavardenis
2018-07-30 16:51 GMT+03:00 Adrian Klaver : > On 07/30/2018 12:40 AM, vardenis pavardenis wrote: > > hello. >> thats interesting. >> maybe you have clue why it happened (i tried install by instructions) and >> how to fix it? :) >> > > Just dawned on me that you are running 14.05 not 14.04 and that

alter table docs

2018-07-30 Thread Rob Sargent
I was just looking up alter table add constraint syntax under "current(10)" and we get     ADD /table_constraint/ [ NOT VALID ]     ADD /table_constraint_using_index/ There is a description below for the using_index version but none for the plain version.  There is a block for the

Re: Incorrect description of the WITH CHECK in the row security can lead to the security issue

2018-07-30 Thread Tom Lane
=?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= writes: > PostgreSQL 10 (in 11 the same > https://www.postgresql.org/docs/10/static/ddl-rowsecurity.html > cite > To use a different policy for rows that are being added to the table > compared to those rows that are visible, the WITH CHECK clause

jndi jdbc url with ssl authenticat in tomcat ... fails org.xml.sax.SAXParseException columnNumber: 79; The reference to entity "ssl" must end with the ';' delimiter

2018-07-30 Thread Didier Wiroth
Hello, I'm trying to configure a postgres jndi resource in tomcat that needs to connect via ssl and client certificate for authentication. Unfortunately ... without success. The user is: esrde_aoo and authenticates with a certificate (no password!). Here is the tomcat 8.5.31 (running on jre

Re: Design of a database table

2018-07-30 Thread Ron
On 07/30/2018 09:37 AM, hmidi slim wrote: I'm trying to design a database table. First of all there are two alternatives: 1-) Divide the table into two tables and make a join. 2-) Design a single table. 1rst alternative: Create table data_periods( id serial primary key not null, period

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread Melvin Davidson
On Mon, Jul 30, 2018 at 10:31 AM, Tom Lane wrote: > Melvin Davidson writes: > > In the release notes for Version 11 Beta, under changes, I see these > scary > > remarks: > > Remove relhaspkey column from system table pg_class (Peter Eisentraut) > > Applications needing to check for a primary

Design of a database table

2018-07-30 Thread hmidi slim
I'm trying to design a database table. First of all there are two alternatives: 1-) Divide the table into two tables and make a join. 2-) Design a single table. 1rst alternative: Create table data_periods( id serial primary key not null, period daterange, project_id integer ) create table

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread Tom Lane
Melvin Davidson writes: > In the release notes for Version 11 Beta, under changes, I see these scary > remarks: > Remove relhaspkey column from system table pg_class (Peter Eisentraut) > Applications needing to check for a primary key should consult pg_index. > > That absolutely breaks my code

Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-30 Thread Melvin Davidson
In the release notes for Version 11 Beta, under changes, I see these scary remarks: Remove relhaspkey column from system table pg_class (Peter Eisentraut) Applications needing to check for a primary key should consult pg_index. That absolutely breaks my code (and I'm guessing others), as I have

Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

2018-07-30 Thread Achilleas Mantzios
On 30/07/2018 16:51, Tom Lane wrote: Achilleas Mantzios writes: This is with PostgreSQL 10.4. How to reproduce : dynacom=# ALTER ROLE amura3 SET search_path TO "$user", amuragents, public; ALTER ROLE ... dynacom=> show search_path ;     search_path ---  $user,

Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-30 Thread Adrian Klaver
On 07/30/2018 12:40 AM, vardenis pavardenis wrote: hello. thats interesting. maybe you have clue why it happened (i tried install by instructions) and how to fix it? :) Just dawned on me that you are running 14.05 not 14.04 and that the packages you installed are for 14.04. Per here:

Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

2018-07-30 Thread Tom Lane
Achilleas Mantzios writes: > This is with PostgreSQL 10.4. > How to reproduce : > dynacom=# ALTER ROLE amura3 SET search_path TO "$user", amuragents, public; > ALTER ROLE > ... > dynacom=> show search_path ; >     search_path > --- >  $user, amuragents, public > (1

Re: Multi client in subscription?

2018-07-30 Thread Andreas Kretschmer
On 30 July 2018 15:29:27 CEST, Adrian Klaver wrote: >On 07/29/2018 11:53 PM, xOChilpili wrote: >> Hi everyone, >> >> I have 2 virtual machines, one that i use at home and the other one >that >> i use at work, so, in the server i have one publication and for each >> client i have the same

Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

2018-07-30 Thread Achilleas Mantzios
On 30/07/2018 16:23, Adrian Klaver wrote: On 07/30/2018 05:57 AM, Achilleas Mantzios wrote: This is with PostgreSQL 10.4. How to reproduce : postgres@smadev:~% psql psql (10.4) Type "help" for help. Alter the role for search path : dynacom=# ALTER ROLE amura3 SET search_path TO "$user",

Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-30 Thread Adrian Klaver
On 07/30/2018 12:40 AM, vardenis pavardenis wrote: hello. thats interesting. maybe you have clue why it happened (i tried install by instructions) and how to fix it? :) Purge the existing packages and try installing again. thanks HTH, Robert -- Adrian Klaver

Re: Multi client in subscription?

2018-07-30 Thread Adrian Klaver
On 07/29/2018 11:53 PM, xOChilpili wrote: Hi everyone, I have 2 virtual machines, one that i use at home and the other one that i use at work, so, in the server i have one publication and for each client i have the same subscription, but every time i go out from home to work, i have to stop

Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

2018-07-30 Thread Adrian Klaver
On 07/30/2018 05:57 AM, Achilleas Mantzios wrote: This is with PostgreSQL 10.4. How to reproduce : postgres@smadev:~% psql psql (10.4) Type "help" for help. Alter the role for search path : dynacom=# ALTER ROLE amura3 SET search_path TO "$user", amuragents, public; ALTER ROLE dynacom=# Verify

ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

2018-07-30 Thread Achilleas Mantzios
This is with PostgreSQL 10.4. How to reproduce : postgres@smadev:~% psql psql (10.4) Type "help" for help. Alter the role for search path : dynacom=# ALTER ROLE amura3 SET search_path TO "$user", amuragents, public; ALTER ROLE dynacom=# Verify : postgres@smadev:~% psql -U amura3 Password for

Multi client in subscription?

2018-07-30 Thread xOChilpili
Hi everyone, I have 2 virtual machines, one that i use at home and the other one that i use at work, so, in the server i have one publication and for each client i have the same subscription, but every time i go out from home to work, i have to stop postgresql service in order to use subscription

Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-30 Thread rob stone
Hello, On Mon, 2018-07-30 at 09:01 +0300, vardenis pavardenis wrote: > > tadas@ubuntu:~$ dpkg -l | grep postgres > ii pgdg-keyring > 2017.3 >

Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-30 Thread vardenis pavardenis
2018-07-28 3:12 GMT+03:00 Adrian Klaver : > On 07/27/2018 04:50 PM, vardenis pavardenis wrote: > Please reply to list also. > Ccing list. > > FYI, bottom/interleaved posting are the preferred styles on this list: > > https://en.wikipedia.org/wiki/Posting_style#Interleaved_style >