[GENERAL] Custom GIST getting ERROR: too many LWLocks taken

2005-11-19 Thread Ben Martin
Hi, Perhaps this post is better suited to another PG mailing list? If this is the cast then apologies up front :/ I've been playing around with improving some of the GiST code in PG 8.1 to better take advantage of domain knowledge where I am applying it. I am now getting "ERROR: too many LWLo

Re: [GENERAL] Anomalies with the now() function

2005-11-19 Thread David Roussel
I don't know about this particular problem, but I find in programming in general it's always best to pass in the value of now as a parameter, and pass it on to functions you are calling, thus avoiding problems with mismatching values. But as Andreas says the values should be the same within

Re: [GENERAL] Sun supporting PostgreSQL

2005-11-19 Thread Marc G. Fournier
On Sat, 19 Nov 2005, Ezra Taylor wrote: Hello all: Just to let you all know, Sun is in trouble. Linux is taking alot of business away from Sun. Can we trust Sun to do the right thing. Also, if Sun adds any code to PG, will it continue to be opensource product. As you can tell,

Re: [GENERAL] shorter way to get new value of serial?

2005-11-19 Thread David Roussel
You can allocate you're numbers from a sequence... http://www.postgresql.org/docs/7.4/interactive/functions-sequence.html Then you can peek at the sequence to see what was last allocated. Exactly how you do it depends on your circumstances. On 18 Nov 2005, at 13:26, Harald Armin Massa wrote:

Re: [GENERAL] Sun supporting PostgreSQL

2005-11-19 Thread Ezra Taylor
Thanks Martijn. On 11/19/05, Martijn van Oosterhout wrote: > On Sat, Nov 19, 2005 at 11:07:55AM -0500, Ezra Taylor wrote: > > Hello all: > >Just to let you all know, Sun is in trouble. Linux is > > taking alot of business away from Sun. Can we trust Sun to do the > > right thing

Re: [GENERAL] Sun supporting PostgreSQL

2005-11-19 Thread Martijn van Oosterhout
On Sat, Nov 19, 2005 at 11:07:55AM -0500, Ezra Taylor wrote: > Hello all: >Just to let you all know, Sun is in trouble. Linux is > taking alot of business away from Sun. Can we trust Sun to do the > right thing. Also, if Sun adds any code to PG, will it continue to be > opensourc

Re: [GENERAL] Sun supporting PostgreSQL

2005-11-19 Thread Ezra Taylor
Hello all: Just to let you all know, Sun is in trouble. Linux is taking alot of business away from Sun. Can we trust Sun to do the right thing. Also, if Sun adds any code to PG, will it continue to be opensource product. As you can tell, I don't trust these big IT companies, but

Re: [GENERAL] How to debug a locked backend ?

2005-11-19 Thread Csaba Nagy
[snip] > So what is the UPDATE doing? What is the query (see pg_stat_activity) > doing? Is it updating a lot of rows? If the query does run for a long > time holding any kind of lock, you're going to get strange effects like > this. The UPDATE is processing ~ 100 rows in a transaction (I'm not sur

Re: [GENERAL] permission issue

2005-11-19 Thread Peter Eisentraut
Rikard Pavelic wrote: > I find this behaviour of PostgreSQL strange. Seems to me that running > function under owners rights is the way to go. Then you should define your functions accordingly with the SECURITY DEFINER clause. -- Peter Eisentraut http://developer.postgresql.org/~petere/ --

Re: [GENERAL] Createlang plpgsql

2005-11-19 Thread Tino Wildenhain
Am Freitag, den 18.11.2005, 15:29 -0800 schrieb Jeremy Sellors: > Hi, > How can I 'createlang plpgsql database' on a shared server? on my ouwn > machine I just used 'su postgres' and 'createlang plpgsql template1' > but I need to have plpgsql available on a shared server. Shared or not, the dba ha

Re: [GENERAL] permission issue

2005-11-19 Thread Martijn van Oosterhout
On Sat, Nov 19, 2005 at 09:35:18AM +0100, Rikard Pavelic wrote: > Recently I saw that there are many changes regarding stored procedures and > I like all of them, but I have a problem with permission issue. > If I grant execution right on function to some user or group PostgreSQL > is unable > to

Re: [GENERAL] implicit index created, do I need to also create an explicit index?

2005-11-19 Thread Martijn van Oosterhout
On Fri, Nov 18, 2005 at 01:38:59PM -0800, Mark Harrison wrote: > So I create a table with unique fields, and it creates an implicit index. > > 1. This is a general purpose index, correct? I.e. not used solely for > ensuring uniqueness, so I don't need to create another index on > the sam

[GENERAL] permission issue

2005-11-19 Thread Rikard Pavelic
Recently I saw that there are many changes regarding stored procedures and I like all of them, but I have a problem with permission issue. If I grant execution right on function to some user or group PostgreSQL is unable to execute this function unless it has all the necessary rights (select, in

Re: [GENERAL] trigger

2005-11-19 Thread Aftab Alam
Hi there, CREATE TABLE emp_mas ( emp_com_cd char(2) NOT NULL, emp_loc_cd numeric NOT NULL, emp_cd numeric NOT NULL, emp_sal numeric, emp_m_name varchar(50), emp_full_name varchar(50), emp_sex varchar(1) ) delete from emp_mas where emp_com_cd = 'KB' and emp_loc_cd = 1 and emp_cd i