Re: [GENERAL] Monitoring Replication - Postgres 9.2

2016-11-30 Thread Cachique
You can try pg_cron. https://github.com/citusdata/pg_cron "pg_cron is a simple cron-based job scheduler for PostgreSQL (9.5 or higher) that runs inside the database as an extension. It uses the same syntax as regular cron, but it allows you to schedule PostgreSQL commands directly from the database

Re: [GENERAL] update records to have occurance number

2016-10-25 Thread Cachique
HI: You can use windows functions. https://www.postgresql.org/ docs/9.5/static/tutorial-window.html specifically row_number(). https://www.postgresql.org/ docs/9.5/static/tutorial-window.html I'm assuming that your ordering is based on lname and then fname. The query for getting 'number' is san

Re: [GENERAL] Doubts about replication from many servers

2016-10-21 Thread Cachique
Hi. You mean one and only one big cluster with all databases from your 4 PG servers ? What about running 4 clusters (different ports) in your backup server and each taking replication from your master servers. Regards, Walter On Fri, Oct 21, 2016 at 12:09 PM, Edilmar LISTAS wrote: > Hi, > > I h

Re: [GENERAL] Filtering by UUID

2016-09-29 Thread Cachique
Take a look at these links. It should give you a clue to avoid LIMIT / OFFSET. https://www.citusdata.com/blog/2016/03/30/five-ways-to-paginate/ http://use-the-index-luke.com/blog/2013-07/pagination-done-the-postgresql-way Regards, Walter On Sep 29, 2016 19:19, "Guyren Howe" wrote: > > On Sep

Re: [GENERAL] a column definition list is required for functions returning "record"

2016-08-26 Thread Cachique
Hi >From the documentation... ( https://www.postgresql.org/ docs/current/static/sql-select.html ) 'Function calls can appear in the FROM clause. (This is especially useful for functions that return result sets, but any function can be used.) This acts as though the function's output were created a