Re: [GENERAL] do I need a table function to do this

2012-12-30 Thread Sim Zacks
Do you have a unique key on site,variable? If not, what do you want in the treatment column if there are rows for both treatments X and Y  or 2 Xs for a specific site and variable? If your data makes sense, you can pivot table t1 and then full

Re: [GENERAL] Cursor fetch Problem.

2012-12-30 Thread Amit kapila
On Friday, December 28, 2012 10:58 AM Harry wrote: > Hi, > Kindly see the below attached statements related to Cursor Fetch Issue it's > still residing as a process. >500 20222 31036 79 Dec27 ?16:22:31 postgres: user1 sampledb >192.168.0.40[36022] FETCH >500 20829 31036 81 Dec2

[GENERAL] rights for schema

2012-12-30 Thread Philipp Kraus
Hello, can I set all rights to a schema and its content? I have different schema and in the public schema all users should be do everything (select, update, delete, call functions, etc). Also if I add a new user, the user should be get also the rights. My other schemas are only access by the da

[GENERAL] bug with indexing of infinite timestamps?

2012-12-30 Thread Scott Ribe
I hit this peculiar result last night with 9.1.3 (Intel, 64-bit). Check out the query and the explain analyze results: explain analyze select count(*) from page_log where end_when > current_date - 1 and succeeded = 't'; QUERY P

Re: [GENERAL] bug with indexing of infinite timestamps?

2012-12-30 Thread Tom Lane
Scott Ribe writes: > I hit this peculiar result last night with 9.1.3 (Intel, 64-bit). Check out > the query and the explain analyze results: Apparently a lot of dead rows with end_when > now are still there. Autovacuum disabled, perhaps? Open prepared transactions? It might be interesting to

[GENERAL] view with insert rule

2012-12-30 Thread Philipp Kraus
Hello, I use some views for creating some different accessibility of the table data. For inserting I use a rule, which works at the moment, but my rules runs the SQL statement "insert into myschema.mytable values (new.*)" If I run on my view the command: insert into myview (field1, field4) value

Re: [GENERAL] view with insert rule

2012-12-30 Thread Tom Lane
Philipp Kraus writes: > Can I create a view, that can be used like a table, so on insert statements > the default values are set? Sure. Just use ALTER VIEW SET DEFAULT to attach default values to the columns of the view. regards, tom lane -- Sent via pgsql-general ma

Re: [GENERAL] rights for schema

2012-12-30 Thread Christian Hammers
Am Sun, 30 Dec 2012 15:54:32 +0100 schrieb Philipp Kraus : > Hello, > > can I set all rights to a schema and its content? I have different > schema and in the public schema all users should be do everything > (select, update, delete, call functions, etc). Also if I add a new > user, the user shou

Re: [GENERAL] rights for schema

2012-12-30 Thread Adrian Klaver
On 12/30/2012 04:06 PM, Christian Hammers wrote: Am Sun, 30 Dec 2012 15:54:32 +0100 schrieb Philipp Kraus : Hello, can I set all rights to a schema and its content? I have different schema and in the public schema all users should be do everything (select, update, delete, call functions, etc).