Re: [GENERAL] Problem with constraint exclusion on partitions

2014-12-19 Thread David G Johnston
On Saturday, December 20, 2014, Mike Pultz [via PostgreSQL] < ml-node+s1045698n583155...@n5.nabble.com> wrote: > Hey David, > > > What version are you using? > > Sorry, I'm on 9.3.4. > > >Now() is a volatile function so the planner cannot omit partitions. > > > >Replace that with a constant and no

Re: [GENERAL] Problem with constraint exclusion on partitions

2014-12-19 Thread Mike Pultz
Hey David, > What version are you using? Sorry, I'm on 9.3.4. >Now() is a volatile function so the planner cannot omit partitions. > >Replace that with a constant and now it can. I'm not sure what you mean- now() is a stable function: cloud_test2=# \df+ now() Schema | Name | Result d

Re: [GENERAL] Problem with constraint exclusion on partitions

2014-12-19 Thread David G Johnston
Mike Pultz wrote > Is there something I'm missing? What version are you using? Now() is a volatile function so the planner cannot omit partitions. Replace that with a constant and now it can. David J. -- View this message in context: http://postgresql.nabble.com/Problem-with-constraint-exc

[GENERAL] Problem with constraint exclusion on partitions

2014-12-19 Thread Mike Pultz
Hello, I'm having an issue getting the query planner to skip child tables based on my check constraints. I have constraint_exclusion = partition in my config file, and I think I have everything set up correctly. The parent table shows the child tables: cloud_test2=# \d+ engine_

Re: [GENERAL] Error - could not get socket error status: Invalid argument

2014-12-19 Thread Vijay
Hi, Is this issue resolved? If yes, can you plz post the solution. Regards, Vijay -- View this message in context: http://postgresql.nabble.com/Error-could-not-get-socket-error-status-Invalid-argument-tp1884036p5830654.html Sent from the PostgreSQL - general mailing list archive at Nabble.com

Re: [GENERAL] Blocking access by remote users for a specific time period

2014-12-19 Thread Scot Kreienkamp
Wouldn't it be a lot easier to set the database logins for those user accounts to zero allowed connections, then terminate their existing sessions, rather than mess with pg_hba.conf? You could schedule a cron job to run a query to make the change to the user, then later the same to undo the cha

Re: [GENERAL] Uninstall Postgresql in openSUSE 13.1

2014-12-19 Thread Arup Rakshit
On Saturday, December 20, 2014 12:53:44 AM Arup Rakshit wrote: > On Saturday, December 20, 2014 12:40:08 AM Arup Rakshit wrote: > > Hi, > > > > I need to uninstall postgresql. I downloaded using > > http://www.enterprisedb.com/products-services-training/pgdownload . But > > now > > I want to unins

Re: [GENERAL] Equivalent of PHP "hex2bin()"

2014-12-19 Thread John McKown
to_hex() takes in integer or bigint and returns a hexadecimal string equivalent. But there is also, perhaps better, encode() and decode() which convert string to either base64, hex, or "escape" codes. http://www.postgresql.org/docs/9.3/static/functions-string.html On Fri, Dec 19, 2014 at 2:38 PM,

[GENERAL] Equivalent of PHP "hex2bin()"

2014-12-19 Thread Stephen Cook
PHP has functions "bin2hex()" and "hex2bin()", and I have to deal with the results in PostgreSQL. These functions "Returns an ASCII string containing the hexadecimal representation of |str|. The conversion is done byte-wise with the high-nibble first" and "Decodes a hexadecimally encoded binar

Re: [GENERAL] Uninstall Postgresql in openSUSE 13.1

2014-12-19 Thread Arup Rakshit
On Saturday, December 20, 2014 12:40:08 AM Arup Rakshit wrote: > Hi, > > I need to uninstall postgresql. I downloaded using > http://www.enterprisedb.com/products-services-training/pgdownload . But now > I want to uninstall it. As there are no uninstaller, I am thinking to > install it manually. >

[GENERAL] Uninstall Postgresql in openSUSE 13.1

2014-12-19 Thread Arup Rakshit
Hi, I need to uninstall postgresql. I downloaded using http://www.enterprisedb.com/products-services-training/pgdownload . But now I want to uninstall it. As there are no uninstaller, I am thinking to install it manually. [root@arup]# find / -name postgresql find: ‘/var/run/user/1000/gvfs’: Pe

[GENERAL] PLV8 for PostgreSQL 9.4 on Ubuntu 14.04

2014-12-19 Thread Jack Christensen
With PostgreSQL 9.3 I installed plv8 from apt.postgresql.org (http://www.postgresql.org/download/linux/ubuntu/). It doesn't appear that it is available for 9.4. Is this no longer offered or has it just not available yet? Thanks. Jack -- Sent via pgsql-general mailing list (pgsql-general@po

Re: [GENERAL] can you please share sample Postgres config file to enable max logging with syslog support?

2014-12-19 Thread Steve Crawford
On 12/18/2014 09:00 PM, M Tarkeshwar Rao wrote: Hello friends, can you please share sample Postgres config file to enable max logging with syslog support? Actually we are facing some issues. We need to enable maximum logging. The "# ERROR REPORTING AND LOGGING" section in postgresql.conf

Re: [GENERAL] pg_dump

2014-12-19 Thread Ramesh T
is their any other method to clone database,other then pgadmin and pgdump.. if is their option pls let me know.. On Wed, Dec 17, 2014 at 4:35 PM, Ramesh T wrote: > > problem solved, > > C:\Program Files\pgadmin\bin>pg_dump -U postgres host -p port -C -f > c:\bb\db_1 db_2 > then > to import i us

Re: [GENERAL] can you please share sample Postgres config file to enable max logging with syslog support?

2014-12-19 Thread Adrian Klaver
On 12/18/2014 09:00 PM, M Tarkeshwar Rao wrote: Hello friends, can you please share sample Postgres config file to enable max logging with syslog support? Actually we are facing some issues. We need to enable maximum logging. Might be better to work this from the other end, as it is easy to d

Re: [GENERAL] pg_dump

2014-12-19 Thread Adrian Klaver
On 12/19/2014 01:17 AM, Ramesh T wrote: is their any other method to clone database,other then pgadmin and pgdump.. if is their option pls let me know.. You will need to be more specific about what you want. Do you want something like what pg_dump offers, a copy of a database at a point in

Re: [GENERAL] Combining two queries

2014-12-19 Thread Marc Mamin
>>I have a table called friends with a user_id and a friend_id (both of these >>relate to an id in a users table). >>For each friend relationship there are two rows. There are currently ONLY >>reciprocal relationships. So if user ids 1 and 2 are friends there will be >>two rows (1,2) and (2,1).

Re: [GENERAL] Combining two queries

2014-12-19 Thread Marc Mamin
>I have a table called friends with a user_id and a friend_id (both of these >relate to an id in a users table). >For each friend relationship there are two rows. There are currently ONLY >reciprocal relationships. So if user ids 1 and 2 are friends there will be two >rows (1,2) and (2,1). >For

[GENERAL] BDR consensus algorithm

2014-12-19 Thread Peter Mogensen
Hi, Can anyone provide a pointer a description of the bidirectional replication global sequences consensus algorithm? The documentation says: "BDR uses a voting/election system to assign blocks from global sequences. The details are in the source code." https://wiki.postgresql.org/wiki/BDR_G