[GENERAL] debugging with child process

2014-06-30 Thread Ravi Kiran
hi, can any one help me with the 4th and 5th steps of the following link which is to debug with a child process in postgres. *https://wiki.postgresql.org/wiki/Working_with_Eclipse#Debugging_with_child_processes

Re: [GENERAL] how to create multiple databases running in different dirs

2014-06-30 Thread John R Pierce
On 6/30/2014 4:58 PM, frank ernest wrote: Hi, I'm new to postgresql and sql in general. I desired to write a program in C that used an sql data base for IPC and because multiple copies of my program might run on the same machine I wanted a way to ensure that only one copy of each multithreaded

[GENERAL] pl/perl and recent perl versions - failing to load internal modules

2014-06-30 Thread Toby Corkindale
Hi, I've been trying out PostgreSQL 9.3 with pl/perl built against Ubuntu 14.04 LTS' Perl 5.18 (Sourced from apt.postgresql.org) Maybe I'm doing something wrong, but it appears that plperl has become completely useless, as it can't load any new modules, but modern Perl versions have refactored

Re: [GENERAL] lock contention, need profiling idea

2014-06-30 Thread Michael Paquier
On Tue, Jul 1, 2014 at 7:36 AM, AI Rumman wrote: > I see lots of similar log message at a certain time in a day on Postgresql > 9,.1: > > LOG: process 18855 still waiting for ShareLock on transaction 2856146023 > after 1001.209 ms > STATEMENT: UPDATE table1 SET time = $1 WHERE id = $2 > > The t

Re: [GENERAL] how to create multiple databases running in different dirs

2014-06-30 Thread Rob Sargent
On 06/30/2014 05:58 PM, frank ernest wrote: Hi, I'm new to postgresql and sql in general. I desired to write a program in C that used an sql data base for IPC and because multiple copies of my program might run on the same machine I wanted a way to ensure that only one copy of each multithreade

[GENERAL] how to create multiple databases running in different dirs

2014-06-30 Thread frank ernest
Hi, I'm new to postgresql and sql in general. I desired to write a program in C that used an sql data base for IPC and because multiple copies of my program might run on the same machine I wanted a way to ensure that only one copy of each multithreaded program got one database but I'm uncertain how

Re: [GENERAL] Cannot query views with WHERE clause on renamed columns

2014-06-30 Thread Tom Lane
Alexander Reichstadt writes: > I try to do what seems to be totally simple, but it fails. If I query a view > that contains renamed columns without any qualifier like > SELECT * FROM myview > it displays everything. If however I do > SELECT reanmedviewcolumn FROM myview > It tells me column

Re: [GENERAL] Cannot query views with WHERE clause on renamed columns

2014-06-30 Thread David G Johnston
Alexander Reichstadt wrote > Hi, > > I try to do what seems to be totally simple, but it fails. If I query a > view that contains renamed columns without any qualifier like > > SELECT * FROM myview > > it displays everything. If however I do > > SELECT reanmedviewcolumn FROM myview > > It tel

[GENERAL] lock contention, need profiling idea

2014-06-30 Thread AI Rumman
I see lots of similar log message at a certain time in a day on Postgresql 9,.1: LOG: process 18855 still waiting for ShareLock on transaction 2856146023 after 1001.209 ms STATEMENT: UPDATE table1 SET time = $1 WHERE id = $2 The table1 size is 17 G. What could be the reason for this lock conte

[GENERAL] Cannot query views with WHERE clause on renamed columns

2014-06-30 Thread Alexander Reichstadt
Hi, I try to do what seems to be totally simple, but it fails. If I query a view that contains renamed columns without any qualifier like SELECT * FROM myview it displays everything. If however I do SELECT reanmedviewcolumn FROM myview It tells me column does not exist which in fact does. I

Re: [GENERAL] how to create a role with no privileges?

2014-06-30 Thread Jerry Sievers
Kynn Jones writes: > How does one define the most limited role/user possible in PostgreSQL? > > Ideally, this role would not be able to do *anything* at all.  In > particular, this role would not be able to query meta-information about > existing tables, functions, > etc. with backslash comman

[GENERAL] how to create a role with no privileges?

2014-06-30 Thread Kynn Jones
How does one define the most limited role/user possible in PostgreSQL? Ideally, this role would not be able to do *anything* at all. In particular, this role would not be able to query meta-information about existing tables, functions, etc. with backslash commands such as \dt, \df. (Of course, i

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Arup Rakshit
On Monday, June 30, 2014 04:52:32 PM Rebecca Clarke wrote: > Hi Arup, > > Two ways come to mind for me. They're pretty much the same as Szymon's, > just minus the sample table creation. I would suggest creating a view > instead, so you can just select from it whenever you please. > > > create v

[GENERAL] Re: collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread David G Johnston
Rebecca Clarke-2 wrote > create view vw_employee as >select * from employees >where ((age(joining_date::date) like '5 years%') or > (age(joining_date::date) like '10 years%') ) This does not give the correct answer to the poster's question - the LIKE with a trailing "%" will pick up non-r

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Szymon Guz
On 30 June 2014 17:52, Rebecca Clarke wrote: > Hi Arup, > > Two ways come to mind for me. They're pretty much the same as Szymon's, > just minus the sample table creation. I would suggest creating a view > instead, so you can just select from it whenever you please. > > > create view vw_employee

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Arup Rakshit
On Monday, June 30, 2014 04:52:32 PM you wrote: > Hi Arup, > > Two ways come to mind for me. They're pretty much the same as Szymon's, > just minus the sample table creation. I would suggest creating a view > instead, so you can just select from it whenever you please. > > > create view vw_empl

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Rebecca Clarke
Hi Arup, Two ways come to mind for me. They're pretty much the same as Szymon's, just minus the sample table creation. I would suggest creating a view instead, so you can just select from it whenever you please. create view vw_employee as select * from employees where ((age(joining_date::

Re: [GENERAL] Examples of projects that use Postgres "as API server"

2014-06-30 Thread Thomas Kellerer
Ben Ellis, 29.06.2014 03:10: > Hi all, > > I've been using Postgres for a small project and I've been very > impressed by its flexibility in defining new types and functions. I > very much like having the ability to define a clean relational model > and then a set of functions that act as the API

Re: [GENERAL] Examples of projects that use Postgres "as API server"

2014-06-30 Thread Bill Moran
On Mon, 30 Jun 2014 16:46:42 +0300 Emre Hasegeli wrote: > > I've been using Postgres for a small project and I've been very impressed > > by its flexibility in defining new types and functions. I very much like > > having the ability to define a clean relational model and then a set of > > funct

Re: [GENERAL] Examples of projects that use Postgres "as API server"

2014-06-30 Thread Emre Hasegeli
> I've been using Postgres for a small project and I've been very impressed > by its flexibility in defining new types and functions. I very much like > having the ability to define a clean relational model and then a set of > functions that act as the API to the data stored in my model. > > Does

[GENERAL] select users as per their years completion date current year

2014-06-30 Thread Arup Rakshit
Suppose I have users table. I have a joining_date. Now I only want those users who completed 5 years, 10 years, and in which date they completed.  Example: Out of all users, suppose below users only - Foo_1 on 24/1/2014 completed 10 years Foo_2 on 2/2/2014 completed  10 years Foo_3 on 14/3/2014

Re: [GENERAL] Very high latency, low bandwidth replication

2014-06-30 Thread Francisco Olarte
Hi Bob. On Mon, Jun 30, 2014 at 10:05 AM, Bob Jolliffe wrote: > What are people's thoughts about a more optimal solution? I would like to > use a more incremental approach to replication. This does not have to be a > "live" replication .. asynchronously triggering once every 24 hours is > suffi

Re: [GENERAL] [ADMIN] [pgadmin-support] Best backup strategy for production systems

2014-06-30 Thread Michael Paquier
Please avoid top-posting... On Mon, Jun 30, 2014 at 7:24 PM, Oliver wrote: > Ok, thanks. > I mean by original wal segments to files generated in pg_xlog, yes. I have > to 0 the parameter wal_keep_segments. They are being generated with 16MB of > size and they are being rotated. What parameter co

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Szymon Guz
On 30 June 2014 12:38, Arup Rakshit wrote: > I have employee table. Where I have a column joining_date. Now I am > looking for a way to get all employee, who completed 5 years, 10 years > current month. How to do so ? I am not able to figure this out. > > Regards, > Arup Rakshit > Hi, take a loo

[GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Arup Rakshit
I have employee table. Where I have a column joining_date. Now I am looking for a way to get all employee, who completed 5 years, 10 years current month. How to do so ? I am not able to figure this out.   Regards, Arup Rakshit

Re: [GENERAL] [pgadmin-support] Best backup strategy for production systems

2014-06-30 Thread Oliver
Thank you very much for your replies. Cheers... 2014-06-29 13:28 GMT+01:00 Michael Paquier : > > > > On Fri, Jun 27, 2014 at 9:55 PM, Oliver wrote: > >> Thank you very much for your reply. >> I've spoken with my boss, databases aren't so important, so if there is a >> little of data lost, ther

Re: [GENERAL] [ADMIN] [pgadmin-support] Best backup strategy for production systems

2014-06-30 Thread Oliver
Ok, thanks. I mean by original wal segments to files generated in pg_xlog, yes. I have to 0 the parameter wal_keep_segments. They are being generated with 16MB of size and they are being rotated. What parameter controls how many files can be generated? Or will it grow indefinitely? Thanks beforehan

[GENERAL] Very high latency, low bandwidth replication

2014-06-30 Thread Bob Jolliffe
Hi I have been grappling with a problem for some time I would appreciate some advice on. We have a public health application which is web based with a postgresql backing store which is designed for use by the public sector ministry of health in a significant number of African, Asian and other cou