[GENERAL] Generic way to test input arguments

2016-10-17 Thread said assemlal
Hello, I am looking for a way to test generically input arguments to raise an exception if one is either null or empty. I was thinking to create a function who takes an array to check them but not sure if it's really good. What would be the best way to achieve that ? Thanks Saïd

[GENERAL] avoiding index on incremental column

2016-10-17 Thread t.dalpo...@gmail.com
Hi, I've a very huge table whose 1st column is a numeric value, starting from 0 at the 1st row and incremented by 1 each new row I inserted. No holes, no duplicates. I need to perform some very fast query based on this value, mainly around the last inserted rows. What is the best I can do? A no

Re: [GENERAL] avoiding index on incremental column

2016-10-17 Thread Stephen Frost
* t.dalpo...@gmail.com (t.dalpo...@gmail.com) wrote: > I've a very huge table whose 1st column is a numeric value, starting > from 0 at the 1st row and incremented by 1 each new row I inserted. > No holes, no duplicates. > I need to perform some very fast query based on this value, mainly > around

Re: [GENERAL] Generic way to test input arguments

2016-10-17 Thread Raymond O'Donnell
On 17/10/16 16:40, said assemlal wrote: Hello, I am looking for a way to test generically input arguments to raise an exception if one is either null or empty. I was thinking to create a function who takes an array to check them but not sure if it's really good. It's not clear what you want t

Re: [GENERAL] Generic way to test input arguments

2016-10-17 Thread Pavel Stehule
Hi 2016-10-17 21:09 GMT+02:00 Raymond O'Donnell : > On 17/10/16 16:40, said assemlal wrote: > >> Hello, >> >> I am looking for a way to test generically input arguments to raise an >> exception if one is either null or empty. >> >> I was thinking to create a function who takes an array to check t

[GENERAL] truncate table restart identity for non-owner

2016-10-17 Thread Bastien Bodart
Hi, It's currently impossible for a non-owner user to do 'TRUNCATE table RESTART IDENTITY;' even with ALL privileges on both the table and the sequences because of the implied ALTER SEQUENCE RESTART operation. Why does it work that way instead of using 'SELECT setval('foo', 1, false);' which

[GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-17 Thread Edilmar LISTAS
I have an env running a changed data_directory fine in a devel machine PG 9.4 using Fedora23. Now, I have a server machine with CentOS where I downloaded the RPMs from repo https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm.

[GENERAL] Immutable datastore library?

2016-10-17 Thread Guyren Howe
I would like to use Postgres as an immutable data store. A subject table would have a timestamp column, and that would be added to what would otherwise be the primary key. Trap updates and turn them into inserts. Have an associated _deleted table. Trap deletes and turn them into inserts of the

Re: [GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-17 Thread Melvin Davidson
On Mon, Oct 17, 2016 at 4:38 PM, Edilmar LISTAS wrote: > I have an env running a changed data_directory fine in a devel machine PG > 9.4 using Fedora23. > Now, I have a server machine with CentOS where I downloaded the RPMs from > repo https://download.postgresql.org/pub/repos/yum/9.6/redhat/ > r

Re: [GENERAL] Immutable datastore library?

2016-10-17 Thread Thomas Munro
On Tue, Oct 18, 2016 at 9:39 AM, Guyren Howe wrote: > I would like to use Postgres as an immutable data store. A subject table > would have a timestamp column, and that would be added to what would > otherwise be the primary key. > > Trap updates and turn them into inserts. Have an associated _d

Re: [GENERAL] Immutable datastore library?

2016-10-17 Thread Guyren Howe
On Oct 17, 2016, at 13:54 , Thomas Munro wrote: > > I've done some projects using temporal (and bitemporal) models based > on Richard Snodgrass's excellent book (which I hear is widely read at > utility companies among others), without any special library support: > > http://www.cs.arizona.edu/~

Re: [GENERAL] [Bucardo-general] Master-Slave setup.

2016-10-17 Thread Periko Support
Excellent, Yes I can make a copy before run bucardo the first time and just add pushdelta to my sync and star working. Thanks David. On Mon, Oct 17, 2016 at 10:04 AM, David Christensen wrote: >> This week will continue testing but I have some doubts in a Master-Slave >> Setup. >> >> The slave db

Re: [GENERAL] Problem changing default data_directory in PG 9.6 + CentOS6

2016-10-17 Thread Adrian Klaver
On 10/17/2016 01:38 PM, Edilmar LISTAS wrote: I have an env running a changed data_directory fine in a devel machine PG 9.4 using Fedora23. Now, I have a server machine with CentOS where I downloaded the RPMs from repo https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-ce

[GENERAL] Dump all the indexes/constraints/roles

2016-10-17 Thread Patrick B
Hi guys, I need to export an entire database to another server, for testing purpose. Is there any way to export all indexes and constraints ? Postgres 9.2 Patrick

Re: [GENERAL] Dump all the indexes/constraints/roles

2016-10-17 Thread John R Pierce
On 10/17/2016 8:32 PM, Patrick B wrote: I need to export an entire database to another server, for testing purpose. Is there any way to export all indexes and constraints ? Postgres 9.2 on the existing machine, as the postgres user pg_dump -Fc -d databasename -f filename.pgdump then, on

Re: [GENERAL] Dump all the indexes/constraints/roles

2016-10-17 Thread Adrian Klaver
On 10/17/2016 08:32 PM, Patrick B wrote: Hi guys, I need to export an entire database to another server, for testing purpose. Is there any way to export all indexes and constraints ? pg_dump the_database Postgres 9.2 Patrick -- Adrian Klaver adrian.kla...@aklaver.com -- Sent via pgsql-

[GENERAL] Collations and codepages

2016-10-17 Thread Raimo Jormakka
Hi all, In Windows 7, and using PostgreSQL 9.4.5, the collation gets set to "English_United States.1252" when I select the "English, United States" locale in the installer. In Linux, the collation is set to "en_US.UTF-8". The encoding is set to UTF-8 in both instances. Will these two instances be