Re: [HACKERS] How to make @id or $id as parameter name in plpgsql, is it available?

2004-11-23 Thread Arnold.Zhu
Hello, Michael Fuhr I've changed my clock. Back to future now. ^_^ Thanks & Regards! Arnold.Zhu 2004-11-24 === 2004-11-24 13:52:05 You wrote: === >On Tue, Nov 23, 2004 at 10:46:54PM -0700, Michael Fuhr wrote: > >> On Thu, Nov 23, 2000 at 11:59:58AM +0800, Ar

Re: [HACKERS] How to make @id or $id as parameter name in plpgsql, is it available?

2004-11-23 Thread Arnold.Zhu
Hello, Michael Fuhr Thank you very much for your reply, I'm looking for a method to port our application with .Net and Sql Server 2000 to linux and mono. Sql server 2000's stored procedure take parameter like @Id, @Name etc. Then in our C# programs, use @Id, @Name as Select, Insert, Delete, Upd

[HACKERS] -V, --version -- deprecated?

2004-11-23 Thread Neil Conway
The "--help" output for most of the binaries we install does not include the "-V" option (just its alias, --version). Is this intentional? (Note that we still document this option in the reference pages for some commands, and initdb's help output does include "-V".) Speaking of command-line optio

Re: [HACKERS] How to make @id or $id as parameter name in plpgsql, is it available?

2004-11-23 Thread Michael Fuhr
On Tue, Nov 23, 2004 at 10:46:54PM -0700, Michael Fuhr wrote: > On Thu, Nov 23, 2000 at 11:59:58AM +0800, Arnold.Zhu wrote: Ummm...did you know your clock was four years behind? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)-

Re: [HACKERS] How to make @id or $id as parameter name in plpgsql, is it available?

2004-11-23 Thread Michael Fuhr
On Thu, Nov 23, 2000 at 11:59:58AM +0800, Arnold.Zhu wrote: > Can I change postgresql's source to make the following plpgsql works ? > If could, would you please tell me where can i change the source? > I want to try it. No need -- PostgreSQL 8.0 (currently in beta) already supports argument name

Re: [HACKERS] Big number of schemas (3500) into a single database

2004-11-23 Thread Tom Lane
"Constantin Teodorescu" <[EMAIL PROTECTED]> writes: > If I will choose to keep a mirror of every workstation database in a > separate schema in the central database that mean that I will have 3500 > different schemas. > Is there any limit or any barrier that could stop this kind of approach or > m

Re: [HACKERS] [JDBC] Strange server error with current 8.0beta driver

2004-11-23 Thread Barry Lind
Tom, Here is what you requested. (Thanks to Oliver for the good logging in the jdbc driver). I also have the test case (in java) down to the bare minimum that generated the following output (that test case is attached). (Note that if the FETCH in the test case is not executed then the backend c

Re: [HACKERS] Plperl Safe version check fails for Safe 2.09

2004-11-23 Thread Tom Lane
Mark Kirkwood <[EMAIL PROTECTED]> writes: > It seems that the check in src/pl/plperl/plperl.c > eval_pv((safe_version < 2.09 ? safe_bad : safe_ok), FALSE); > is not working quite as expected (CVS HEAD from today): Yah know, I looked at that on Monday and said to myself "Self, that looks like a r

Re: [Testperf-general] Re: [HACKERS] ExclusiveLock

2004-11-23 Thread Kenneth Marshall
On Tue, Nov 23, 2004 at 12:04:17AM +, Simon Riggs wrote: > On Mon, 2004-11-22 at 23:37, Greg Stark wrote: > > Simon Riggs <[EMAIL PROTECTED]> writes: > > > > > - Find a way to reduce rotational delay when repeatedly writing last WAL > > > page > > > > > > Currently fsync of WAL requires the

[HACKERS] How to make @id or $id as parameter name in plpgsql, is it available?

2004-11-23 Thread Arnold.Zhu
Hello, pgsql-hackers Can I change postgresql's source to make the following plpgsql works ? If could, would you please tell me where can i change the source? I want to try it. --- CREATE FUNCTION users_select_by_id(@id int4) RETURNS SETOF users_

[HACKERS] Big number of schemas (3500) into a single database

2004-11-23 Thread Constantin Teodorescu
Hello to everybody again,   thought you didn’t hear any news from me for a very long time, the news are good J I’m still here and promoting PostgreSQL.   I am involved in the developing of a big romanian project for the vets that will put Linux & PostgreSQL on 3500 computers in the who

[HACKERS] Bitmap index

2004-11-23 Thread Pawe³ Niewiadomski
Hello, I saw discussion about bitmap indexes few weeks ago. I wonder if any of you is working on it (in secret)? I will be chosing subject of my master thesis and thougth about implementing bitmap indexes. -- **Paweł Niewiadomski**, new()foo-baz.com, http://new.foo-baz.com/ Podręcznik Administrat

Re: [HACKERS] Plperl Safe version check fails for Safe 2.09

2004-11-23 Thread Mark Kirkwood
A bit more thinking led me to try: float safe_version; ... eval_pv((safe_version < (float)2.09 ? safe_bad : safe_ok), FALSE); which seems to fix the issue. (after all float *should* be accurate enough in this case) cheers Mark P.s : trivial patch attached Andrew Dunstan wrote: Could b

Re: [HACKERS] Beta5 now Available

2004-11-23 Thread David Fetter
On Tue, Nov 23, 2004 at 08:43:56PM -0400, Marc G. Fournier wrote: > On Wed, 24 Nov 2004, Thomas Hallgren wrote: > > >Gaetano Mendola wrote: > >>...so the very first client is the real server that must be run > >>24/24. > >> > >I don't think this is correct. You need a tracker for downloaders > >to

Re: [HACKERS] OpenBSD/Sparc status

2004-11-23 Thread Michael Fuhr
On Tue, Nov 23, 2004 at 11:34:44AM -0700, Michael Fuhr wrote: > > gcc 3.4.2 on Solaris 9/sparc 64 appears to be okay. But gcc 3.3.2 on Solaris 9/sparc 64 isn't. % gcc -m64 test.c % ./a.out x = 12.3 y = 12.3 % gcc -O -m64 test.c % ./a.out x = 12.3 y = 2.51673e-42 % gcc -O2 -m64 test.c % ./a.out

Re: [HACKERS] OpenBSD/Sparc status

2004-11-23 Thread Michael Fuhr
On Tue, Nov 23, 2004 at 12:47:28PM -0800, Darcy Buskermolen wrote: > I'm guessing we need to add some more configure logic to detect gcc versions > 3.4 on sparc trying to produce 64bit code and disable optimizations, or else > bail out and ask them to upgrade. Shouldn't that be gcc versions 3.3

Re: [HACKERS] Plperl Safe version check fails for Safe 2.09

2004-11-23 Thread Andrew Dunstan
Could be a rounding issue. What happens if you try this instead:? eval_pv((safe_version <= 2.08 ? safe_bad : safe_ok), FALSE); Alternatively, what happens if we make safe_version a double rather than a float? (If nothing else works we might have to fall back on a lexical comparison) cheers andr

Re: [HACKERS] Beta5 now Available

2004-11-23 Thread Marc G. Fournier
On Wed, 24 Nov 2004, Thomas Hallgren wrote: Gaetano Mendola wrote: ...so the very first client is the real server that must be run 24/24. I don't think this is correct. You need a tracker for downloaders to be able to find each other but no client is more important than the others. can there be mu

[HACKERS] Plperl Safe version check fails for Safe 2.09

2004-11-23 Thread Mark Kirkwood
It seems that the check in src/pl/plperl/plperl.c eval_pv((safe_version < 2.09 ? safe_bad : safe_ok), FALSE); is not working quite as expected (CVS HEAD from today): I have Safe.pm at version 2.09, yet any plperl function I run fails with : ERROR: error from function: trusted perl functions disab

Re: [HACKERS] Beta5 now Available

2004-11-23 Thread Thomas Hallgren
Gaetano Mendola wrote: ...so the very first client is the real server that must be run 24/24. I don't think this is correct. You need a tracker for downloaders to be able to find each other but no client is more important than the others. Regards, Thomas Hallgren ---(end o

Re: [HACKERS] Beta5 now Available

2004-11-23 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marc G. Fournier wrote: | On Mon, 22 Nov 2004, Thomas Hallgren wrote: | |> Marc G. Fournier wrote: |> |>> What about the Java version that Gavin had mentioned? Aegus or |>> something like that? |>> |> http://azureus.sourceforge.net/ | | | There is a Fr

[HACKERS] Easy way to download all .torrents

2004-11-23 Thread Jim C. Nasby
For a while I've been keeping a bittorrent client running with some of the common postgresql torrents that are available, but grabbing the .torrent files is a bit of a pain. Is there an easy way to download all of the appropriate .torrent files that are available? -- Jim C. Nasby, Database Consult

Re: [HACKERS] OpenBSD/Sparc status

2004-11-23 Thread Darcy Buskermolen
On November 23, 2004 11:37 am, Jim Seymour wrote: > Stefan Kaltenbrunner <[EMAIL PROTECTED]> wrote: > > Darcy Buskermolen wrote: > > > On November 19, 2004 10:55 am, you wrote: > > >>The answer is: it's a gcc bug. The attached program should print > > >>x = 12.3 > > >>y = 12.3 > > >> > > >>but if

Re: [HACKERS] another plperl bug

2004-11-23 Thread Andrew Dunstan
Richard Poole wrote: Indeed. It would be Perlish to have some magic so that when you called one PL/Perl function from another you could return an array ref from the inner one and have it Do What You Mean in the outer one, too. There is no way to have one plperl function call another directly

Re: [HACKERS] OpenBSD/Sparc status

2004-11-23 Thread Jim Seymour
Stefan Kaltenbrunner <[EMAIL PROTECTED]> wrote: > > Darcy Buskermolen wrote: > > On November 19, 2004 10:55 am, you wrote: > > > >>The answer is: it's a gcc bug. The attached program should print > >>x = 12.3 > >>y = 12.3 > >> > >>but if compiled with -O or -O2 on Stefan's machine, I get garbage

Re: [HACKERS] another plperl bug

2004-11-23 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Tue, Nov 23, 2004 at 11:37:22AM -0500, Tom Lane wrote: >> I would add these test cases to the regression test were it not that the >> addresses are machine-dependent... > I haven't looked into how the regression tests work -- can test > output be post-

Re: [HACKERS] another plperl bug

2004-11-23 Thread Richard Poole
On Tue, Nov 23, 2004 at 11:37:22AM -0500, Tom Lane wrote: > > > CREATE FUNCTION test1() RETURNS TEXT AS $$ > > return ["test"]; > > $$ LANGUAGE plperl; > > > SELECT test1(); > > test1 > > -- > > ARRAY(0x8427a58) > > (1 row) > > This is exactly what Perl will do if y

Re: [HACKERS] OpenBSD/Sparc status

2004-11-23 Thread Stefan Kaltenbrunner
Darcy Buskermolen wrote: On November 19, 2004 10:55 am, you wrote: The answer is: it's a gcc bug. The attached program should print x = 12.3 y = 12.3 but if compiled with -O or -O2 on Stefan's machine, I get garbage: $ gcc -O ftest.c $ ./a.out x = 12.3 y = 1.47203e-39 $ gcc -v Reading specs from

Re: [HACKERS] OpenBSD/Sparc status

2004-11-23 Thread Michael Fuhr
On Tue, Nov 23, 2004 at 09:57:03AM -0800, Darcy Buskermolen wrote: > I can confirm this behavior on Solaris 8/sparc 64 as well. gcc 3.4.2 on Solaris 9/sparc 64 appears to be okay. % gcc -v Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/specs Configured with: ../configure --with

Re: [HACKERS] OpenBSD/Sparc status

2004-11-23 Thread Stefan Kaltenbrunner
Tom Lane wrote: Darcy Buskermolen <[EMAIL PROTECTED]> writes: I can confirm this behavior on Solaris 8/sparc 64 as well. bash-2.03$ gcc -m64 -O2 test.c bash-2.03$ ./a.out x = 12.3 y = 2.51673e-42 bash-2.03$ gcc -m64 -O3 test.c bash-2.03$ ./a.out x = 12.3 y = 12.3 bash-2.03$ Hmm. I hadn't both

Re: [HACKERS] another plperl bug

2004-11-23 Thread Michael Fuhr
On Tue, Nov 23, 2004 at 11:37:22AM -0500, Tom Lane wrote: > $ perl -e 'print ["test 1"], "\n"' > ARRAY(0xa03ec28) > $ > > so I don't think a Perl programmer would find it surprising; if anything > he'd probably complain if we *didn't* do that. Understood, which is why I mentioned that such cases

Re: [HACKERS] OpenBSD/Sparc status

2004-11-23 Thread Darcy Buskermolen
On November 19, 2004 10:55 am, you wrote: > The answer is: it's a gcc bug. The attached program should print > x = 12.3 > y = 12.3 > > but if compiled with -O or -O2 on Stefan's machine, I get garbage: > > $ gcc -O ftest.c > $ ./a.out > x = 12.3 > y = 1.47203e-39 > $ gcc -v > Reading specs from /

Re: [HACKERS] Beta5 now Available

2004-11-23 Thread David Fetter
On Tue, Nov 23, 2004 at 11:06:40AM -0600, Jeff Hoffmann wrote: > Marc G. Fournier wrote: > >>The download servers have enough bandwidth to serve any client > >>faster than the client can take. The traffic on the download > >>servers is not reduced, only distributed differently. I don't see > >>a

Re: [HACKERS] Beta5 now Available

2004-11-23 Thread Stephen Frost
* Marc G. Fournier ([EMAIL PROTECTED]) wrote: > On Tue, 23 Nov 2004, Peter Eisentraut wrote: > >The download servers have enough bandwidth to serve any client faster than > >the client can take. The traffic on the download servers is not reduced, > >only distributed differently. I don't see any a

Re: [HACKERS] Beta5 now Available

2004-11-23 Thread Jeff Hoffmann
Marc G. Fournier wrote: The download servers have enough bandwidth to serve any client faster than the client can take. The traffic on the download servers is not reduced, only distributed differently. I don't see any advantage. Actually, and here is where I exhibit my total lack of knowledge o

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-23 Thread Matt
> What about > for i in ... > ... new.(tg_argv[i]) ... Ooof! Constants or digits or nothing, then > MHO: this is a really ugly wart on the language, and it does not solve > the problems people would want to solve. It might solve *your* problem > but that's not enough to jus

Re: [HACKERS] Beta5 now Available

2004-11-23 Thread Marc G. Fournier
On Tue, 23 Nov 2004, Peter Eisentraut wrote: Am Montag, 22. November 2004 17:40 schrieb David Fetter: A much slimmed-down bt.postgresql.org is now serving it. :) Out of curiosity, what purpose does a bittorrent source serve in this case? I've always just seen it as an alternative option for downloa

Re: [HACKERS] another plperl bug

2004-11-23 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > How far do you want to go with checking return types? Some of the > following test cases are approaching "garbage in, garbage out" > territory and I don't know how much effort you want to put into > protecting programmers from themselves. Some of the cas

Re: [HACKERS] Beta5 now Available

2004-11-23 Thread David Fetter
On Tue, Nov 23, 2004 at 05:33:15PM +0100, Peter Eisentraut wrote: > Am Montag, 22. November 2004 17:40 schrieb David Fetter: > > A much slimmed-down bt.postgresql.org is now serving it. :) > > Out of curiosity, what purpose does a bittorrent source serve in > this case? BitTorrent was designed to

Re: [HACKERS] Beta5 now Available

2004-11-23 Thread Peter Eisentraut
Am Montag, 22. November 2004 17:40 schrieb David Fetter: > A much slimmed-down bt.postgresql.org is now serving it. :) Out of curiosity, what purpose does a bittorrent source serve in this case? The download servers have enough bandwidth to serve any client faster than the client can take. The

Re: [HACKERS] Trouble with plpgsql on 7.4.6

2004-11-23 Thread Patrick Welche
On Tue, Nov 23, 2004 at 07:25:17AM -0500, D'Arcy J.M. Cain wrote: > The stderr was in the previous message. No gripes there either other > than in the startup after the failure. > > > Also see about getting a stack trace from one of the core dumps. > > I did look at the core file and here is wha

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-23 Thread Tom Lane
Matt <[EMAIL PROTECTED]> writes: > It would be a good idea to check that the variable was either a constant > or a trigger arg. This would stop the looping problem, since the type of > the underlying field couldn't change. What about for i in ... ... new.(tg_argv[i]) ... >

Re: [Testperf-general] Re: [HACKERS] ExclusiveLock

2004-11-23 Thread Bort, Paul
Title: RE: [Testperf-general] Re: [HACKERS] ExclusiveLock > From: Doug McNaught [mailto:[EMAIL PROTECTED]] > > "Bort, Paul" <[EMAIL PROTECTED]> writes: > > >    One other thought: How does static RAM compare to disk > speed nowadays? > >    A 1Gb flash drive might be reasonable for the WAL

Re: [HACKERS] [JDBC] Strange server error with current 8.0beta driver

2004-11-23 Thread Tom Lane
"Barry Lind" <[EMAIL PROTECTED]> writes: > OK, getting closer. The error happens if in jdbc I reuse > PreparedStatement objects to reexecute the same set of queries multiple > times. The TRAP you showed looked like it might have something to do with trying to execute code outside any transaction.

Re: [Testperf-general] Re: [HACKERS] ExclusiveLock

2004-11-23 Thread Doug McNaught
"Bort, Paul" <[EMAIL PROTECTED]> writes: >One other thought: How does static RAM compare to disk speed nowadays? >A 1Gb flash drive might be reasonable for the WAL if it can keep up. Flash RAM "wears out"; it's not suitable for a continuously-updated application like WAL. -Doug

Re: [Testperf-general] Re: [HACKERS] ExclusiveLock

2004-11-23 Thread Bort, Paul
Title: RE: [Testperf-general] Re: [HACKERS] ExclusiveLock > The impression I had was that disk drives no longer pay the slightest > attention to interleave specs, because the logical model > implied by the > concept is too far removed from modern reality (on-disk buffering, > variable numbers

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-23 Thread Mike Rylander
Just to put in my .02$, I would absolutely love to see this functionality included in plpgsql. With some extra error checking for the know changing datatype failure, and docs that mention that limitation, I'd say this is a great extension to the language. plpgsql feels quicker than the interprete

Re: [HACKERS] Trouble with plpgsql on 7.4.6

2004-11-23 Thread D'Arcy J.M. Cain
On Sat, 20 Nov 2004 11:17:48 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes: > > I thought that this would have sent everything to both the log and > > the screen but I found that the syslog has much more detail. I have > > attached that output. > > We s

[HACKERS] Open thoughts about updateable views

2004-11-23 Thread Bernd Helmle
As somebody already noticed i'm working on view update rules for (currently SQL92 only) updateable views. There are some issues i would like to hear the opinion of experienced pgsql-hackers about (and maybe get some pointers to solve them): Column DEFAULT values aren't automatically "inherited"

Re: [HACKERS] patch: plpgsql - access records with rec.(expr)

2004-11-23 Thread Matt
> > See your point. But what about NEW.($1)? > > I don't follow -- what do you mean? I want to be able to be able to write a trigger function that accesses a column passed as an argument to the function in the row that caused the trigger. This is my use case. I guess that would actually written