[HACKERS] getting oid of function

2005-02-13 Thread Sibtay Abbas
Hello all Is it possible to get the oid of a function on the basis of its name?. The scenario which i am currently facing is that i have the function name, now i want search the pg_proc system catalog on the basis of the function name and retrieve its Oid. Another confusion which i am facing is

Re: [HACKERS] Design notes for BufMgrLock rewrite

2005-02-13 Thread Greg Stark
Bruce Momjian writes: > Tom Lane wrote: > > > > One thing I realized quickly is that there is no natural way in a clock > > algorithm to discourage VACUUM from blowing out the cache. I came up > > with a slightly ugly idea that's described below. Can anyone do better? > > Uh, is the clock alg

Re: [HACKERS] Query optimizer 8.0.1 (and 8.0)

2005-02-13 Thread Tzahi Fadida
Just my 2 cents. I am not a super statistics guy but besides increasing the sample size and assumming things on the distribution, I understand you want to get more info on what distribution the data represents. usualy the problem with these things is that the data needs to be sorted on the index ke

[HACKERS] Dealing with network-dead clients

2005-02-13 Thread Oliver Jowett
I'm currently trying to find a clean way to deal with network-dead clients that are in a transaction and holding locks etc. The normal "client closes socket" case works fine. The scenario I'm worried about is when the client machine falls off the network entirely for some reason (ethernet probl

Re: [HACKERS] Design notes for BufMgrLock rewrite

2005-02-13 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> One thing I realized quickly is that there is no natural way in a clock > >> algorithm to discourage VACUUM from blowing out the cache. I came up > >> with a slightly ugly idea that's described below. Can anyone do better? > > > U

Re: [HACKERS] [pgsql-hackers-win32] Repleacement for src/port/snprintf.c

2005-02-13 Thread Bruce Momjian
Nicolai Tufar wrote: > Hello all, > > I would like to submit my changes to src/port/snprintf.c to > enable %n$ format placeholder replacement in snprintf() and > vsnprintf(). Additionally I implemented a trivial printf(). > > I also attach a diff for configure.in to include snprintf.o > in pgport

Re: [HACKERS] Design notes for BufMgrLock rewrite

2005-02-13 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> One thing I realized quickly is that there is no natural way in a clock >> algorithm to discourage VACUUM from blowing out the cache. I came up >> with a slightly ugly idea that's described below. Can anyone do better? > Uh, is the clock algorithm also

Re: [HACKERS] Design notes for BufMgrLock rewrite

2005-02-13 Thread Bruce Momjian
Tom Lane wrote: > I'm working on an experimental patch to break up the BufMgrLock along > the lines we discussed a few days ago --- in particular, using a clock > sweep algorithm instead of LRU lists for the buffer replacement strategy. > I started by writing up some design notes, which are attache

Re: [HACKERS] Goals for 8.1

2005-02-13 Thread Bruce Momjian
Nicolai Tufar wrote: > On Sun, 23 Jan 2005 21:43:17 -0800, Benjamin Arai <[EMAIL PROTECTED]> wrote: > > What are the goals for 8.1? > > Fix %n$ format string argument placement in > platforms that do not support it, like HP-UX, Win32 Also add NetBSD and BSD/OS to that. It turns out %1$ isn't par

[HACKERS] Design notes for BufMgrLock rewrite

2005-02-13 Thread Tom Lane
I'm working on an experimental patch to break up the BufMgrLock along the lines we discussed a few days ago --- in particular, using a clock sweep algorithm instead of LRU lists for the buffer replacement strategy. I started by writing up some design notes, which are attached for review in case any

Re: [HACKERS] Query optimizer 8.0.1 (and 8.0)

2005-02-13 Thread Jim C. Nasby
What's the purpose of doing this transformation? Is it just a means to sub-divide the dataset? It's very possible that PostGIS would do just as good a job, without using HTM. Granted, GIS is designed more for working in LAT/LONG, but I suspect it should work just as well in whatever coordinate syst

Re: [HACKERS] strerror_r int and char* return type mixup on FC2

2005-02-13 Thread Bruce Momjian
Jeroen van Iddekinge wrote: > Thanks for the reply, > > I have 7.4.7 and 8.0.0 both installed , so I din't noticed that i was > using 7.4.7 client. > 8.0.0 works fine OK, thanks for the report. --- > > Thanks > > Jeroe

Re: [HACKERS] strerror_r int and char* return type mixup on FC2

2005-02-13 Thread Jeroen van Iddekinge
Thanks for the reply, I have 7.4.7 and 8.0.0 both installed , so I din't noticed that i was using 7.4.7 client. 8.0.0 works fine Thanks Jeroen Jeroen van Iddekinge wrote: Hi, I noticed that there where strange symbols in the error message when I can't connect to a database. This happends i

Re: [HACKERS] strerror_r int and char* return type mixup on FC2

2005-02-13 Thread Bruce Momjian
Jeroen van Iddekinge wrote: > Hi, > > I noticed that there where strange symbols in the error message when I > can't connect to a database. > This happends in PHP and pgsql and in the 7.4.x and 8.0 version of > postgesql > > in pqStrError there is a 'if def' for 'char*' and 'int' return type

Re: [HACKERS] Query optimizer 8.0.1 (and 8.0)

2005-02-13 Thread Oleg Bartunov
Probably off-topic, but I think it's worth to see what astronomers are doing with their very big spatial databases. For example, we are working with more than 500,000,000 rows catalog and we use some special transformation of coordinates to integer numbers with preserving objects closeness. I hope

[HACKERS] strerror_r int and char* return type mixup on FC2

2005-02-13 Thread Jeroen van Iddekinge
Hi, I noticed that there where strange symbols in the error message when I can't connect to a database. This happends in PHP and pgsql and in the 7.4.x and 8.0 version of postgesql in pqStrError there is a 'if def' for 'char*' and 'int' return type strerror_r. I'm have FC2 linux. This version

Re: [HACKERS] creating the same table in 2 different sessions

2005-02-13 Thread Tom Lane
Jeroen van Iddekinge <[EMAIL PROTECTED]> writes: > begin; > create table a0(a bigint); > than login for a second session > begin > create table a0(a bigint) > postgres block nows in session 2 > when session 1 is commited the following error appears in session 2 > duplicate key violates unique

[HACKERS] creating the same table in 2 different sessions

2005-02-13 Thread Jeroen van Iddekinge
Hi, Maybe I found the following bug or 'not ideal behaviour' of postgres(version 7.4.7 and 8.0 /linux): first start asession 1 begin; create table a0(a bigint); than login for a second session begin create table a0(a bigint) postgres block nows in session 2 when session 1 is commited the follow

Re: [HACKERS] slow SP with temporary tables, PLPGSQL problems

2005-02-13 Thread Pavel Stehule
> > Create the temp table only once per connection (you can use ON COMMIT > > DELETE ROWS instead of ON COMMIT DROP to clean it out). Then you won't > > need to use EXECUTE. > > I am sorry, first time I didn't understand. Now I did some test and its good adivice. Sometimes I have problem underst