Re: [HACKERS] INOUT/OUT problems with IMMUTABLE

2005-05-27 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > Is the following behavior intended? Nope. Thanks for the report ;-) regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://ar

Re: [HACKERS] patches for items from TODO list

2005-05-27 Thread Bruce Momjian
I have removed the XML TODO item: * Add XML output to pg_dump and COPY We already allow XML to be stored in the database, and XPath queries can be used on that data using /contrib/xml2. It also supports XSLT transformations.

Re: [HACKERS] Can we simplify win32 threading code

2005-05-27 Thread Qingqing Zhou
""Magnus Hagander"" <[EMAIL PROTECTED]> writes > > It may not be necessary at all. But what I meant is I don't know what > the default permissinos ar eon a shared mem/event object in the global > namespace. On the naemd pipe it's "creator/owner full" (so the postgres > account itself can issue ki

Re: [HACKERS] overlaps() does not work as expected?

2005-05-27 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > I think they may have intended to treat each time interval > as the half-open interval [S,T), that is S <= time < T. However > that would leave a zero-length interval as completely empty and > thereby arguably not overlapping anything ... which they didn't

[HACKERS] INOUT/OUT problems with IMMUTABLE

2005-05-27 Thread Michael Fuhr
Is the following behavior intended? CREATE FUNCTION foo(INOUT x integer, INOUT y integer) AS $$ BEGIN x := x * 10; y := y * 10; END; $$ LANGUAGE plpgsql; SELECT * FROM foo(1, 2); x | y + 10 | 20 (1 row) ALTER FUNCTION foo(integer, integer) IMMUTABLE; SELECT * FROM foo(1, 2)

Re: [HACKERS] overlaps() does not work as expected?

2005-05-27 Thread Tom Lane
Mario Weilguni <[EMAIL PROTECTED]> writes: > I've quite some trouble with the overlaps function: > SELECT overlaps('9.6.2005'::date, '9.6.2005'::date, '9.6.2005'::date, > '9.6.2005'::date); > returns true (these are german timestamps dd.mm.) > SELECT overlaps('8.6.2005'::date, '9.6.2005'::dat

Re: [HACKERS] Oracle Style packages on postgres

2005-05-27 Thread Bruce Momjian
Added to TODO: * Add the features of packages o Make private objects accessable only to objects in the same schema o Allow current_schema.objname to access current schema objects o Add session variables o Allow nested schemas -

Re: [HACKERS] Cost of XLogInsert CRC calculations

2005-05-27 Thread Bruce Momjian
Tom Lane wrote: > Alternatively, we might say that 64-bit CRC was overkill from day one, > and we'd rather get the additional 10% or 20% or so speedup. I'm kinda > leaning in that direction, but only weakly. Yes, I lean in that direction too since the CRC calculation is showing up in our profilin

[HACKERS] OSCON field trip, Friday afternoon

2005-05-27 Thread Josh Berkus
Folks, With OSCON 2005 (August 1-5) registration now open, I wanted to invite members of the PostgreSQL community along on a "field trip" immediately following OSCON. We will be visiting the offices of the National Weather Service and of ODSL in Portland. Transportation will be provided spons

Re: [HACKERS] overlaps() does not work as expected?

2005-05-27 Thread Jochem van Dieten
On 5/27/05, Mario Weilguni wrote: > I've quite some trouble with the overlaps function: > SELECT overlaps('9.6.2005'::date, '9.6.2005'::date, '9.6.2005'::date, > '9.6.2005'::date); > returns true (these are german timestamps dd.mm.) > > SELECT overlaps('8.6.2005'::date, '9.6.2005'::date, '9.6.

Re: [HACKERS] overlaps() does not work as expected?

2005-05-27 Thread Alvaro Herrera
On Fri, May 27, 2005 at 06:35:32PM +0200, Mario Weilguni wrote: > I've quite some trouble with the overlaps function: > SELECT overlaps('9.6.2005'::date, '9.6.2005'::date, '9.6.2005'::date, > '9.6.2005'::date); > returns true (these are german timestamps dd.mm.) > > SELECT overlaps('8.6.2005'

Re: [HACKERS] Cost of XLogInsert CRC calculations

2005-05-27 Thread Tom Lane
"Mark Cave-Ayland" <[EMAIL PROTECTED]> writes: > I don't know whether gcc is just producing an inefficient CRC32 compared to > 2x32 but the results seem very odd There must be something else we are > missing? I went back and looked at the code, and see that I was misled by terminology: what we

[HACKERS] overlaps() does not work as expected?

2005-05-27 Thread Mario Weilguni
I've quite some trouble with the overlaps function: SELECT overlaps('9.6.2005'::date, '9.6.2005'::date, '9.6.2005'::date, '9.6.2005'::date); returns true (these are german timestamps dd.mm.) SELECT overlaps('8.6.2005'::date, '9.6.2005'::date, '9.6.2005'::date, '9.6.2005'::date); returns fal

Re: [HACKERS] Multiple-statement Rules Incompatible With Constraints

2005-05-27 Thread Curt Sampson
On Fri, 27 May 2005, Tom Lane wrote: Same old same old: as soon as you've deleted from offer_mutable, there is no row in the view with the given offer_id; and since OLD is a macro for the view, the second delete finds nothing to do. Oh, now I'm starting to see how this behavior does make sense

Re: [HACKERS] WAL replay failure after file truncation(?)

2005-05-27 Thread Simon Riggs
On Wed, 2005-05-25 at 21:24 +0200, Manfred Koizar wrote: > WAL replay does not apply changes to nonexistent blocks, > but it keeps a list (hash table, file, whatever) of those blocks. > When a truncate WAL record is found, all entries for blocks affected > by the truncation are removed from the lis

Re: [HACKERS] logging sql from JDBC

2005-05-27 Thread David Parker
Thanks! >-Original Message- >From: Simon Riggs [mailto:[EMAIL PROTECTED] >Sent: Friday, May 27, 2005 11:45 AM >To: David Parker >Cc: pgsql-hackers@postgresql.org >Subject: Re: [HACKERS] logging sql from JDBC > >On Wed, 2005-05-25 at 12:03 -0400, David Parker wrote: >> Could somebody poin

Re: [HACKERS] logging sql from JDBC

2005-05-27 Thread Simon Riggs
On Wed, 2005-05-25 at 12:03 -0400, David Parker wrote: > Could somebody point me at the area of the source where this decision > gets made, and/or how difficult it would be to enable this logging? This has just been fixed for 8.1, patch recently submitted. In the meantime, use p6spy Best Regards

Re: [HACKERS] rendezvous

2005-05-27 Thread Bruce Momjian
Joshua D. Drake wrote: > Should we not change it to bonjour as that is the actual name for it? Done, in CVS. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road +

Re: [HACKERS] foreign keys and RI triggers

2005-05-27 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: >> (b) it can share infrastructure with the other RI triggers. > Such as? I don't see anything it allows us to share. Note the ri_BuildQueryKeyFull call, and the arguments thereto. As to the notational convenience issue, I think it's good that RI_FKey_keye

Re: [HACKERS] A 2 phase commit weirdness

2005-05-27 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Looking at the sequence, at least the relcache init file stuff looks if > not broken at least a bit heavy-handed... I was planning to change that ;-) ... using separate 2PC action records for the relcache init file actions would make it much better

Re: [HACKERS] Cost of XLogInsert CRC calculations

2005-05-27 Thread Mark Cave-Ayland
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 27 May 2005 15:00 > To: Mark Cave-Ayland (External) > Cc: 'Manfred Koizar'; 'Greg Stark'; 'Bruce Momjian'; > pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Cost of XLogInsert CRC calculations (cut) > Not sure

Re: [HACKERS] A 2 phase commit weirdness

2005-05-27 Thread Heikki Linnakangas
On Thu, 26 May 2005, Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: I'm wondering what should happen at prepare time so that "my own cache" is correct. Good point. As far as the local caches are concerned, we probably have to make it look like the transaction rolled back. I thin

Re: [HACKERS] foreign keys and RI triggers

2005-05-27 Thread Neil Conway
Tom Lane wrote: Because (a) it needs all the same arguments Well, it needs the Trigger that we're in the process of queueing, the old tuple, the new tuple, and the updated relation. It doesn't need the rest of the content of TriggerData. trigger.c has to manually construct a TriggerData to p

Re: [HACKERS] Cost of XLogInsert CRC calculations

2005-05-27 Thread Mark Cave-Ayland
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 27 May 2005 15:00 > To: Mark Cave-Ayland (External) > Cc: 'Manfred Koizar'; 'Greg Stark'; 'Bruce Momjian'; > pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Cost of XLogInsert CRC calculations > > > "Mark Cav

Re: [HACKERS] Multiple-statement Rules Incompatible With Constraints

2005-05-27 Thread Tom Lane
Curt Sampson <[EMAIL PROTECTED]> writes: > CREATE VIEW offer AS > SELECT * FROM offer_immutable NATURAL JOIN offer_mutable; > In a transaction, when I try to commit, this does not work: > CREATE OR REPLACE RULE offer_delete AS > ON DELETE TO offer DO INSTEAD ( > DE

Re: [HACKERS] WAL replay failure after file truncation(?)

2005-05-27 Thread Hans-Jürgen Schönig
Tom Lane wrote: =?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <[EMAIL PROTECTED]> writes: My question is: What happens if the system is killed inside rebuild_relation or inside swap_relfilenodes which is called by rebuild_relation? Nothing at all, because the system catalog updates aren't commit

Re: [HACKERS] Cost of XLogInsert CRC calculations

2005-05-27 Thread Tom Lane
"Mark Cave-Ayland" <[EMAIL PROTECTED]> writes: > Opt 32 32a32b2x32 64 64a 64b > > O14.91 4.86 5.43 6.00 11.4 11.3911.39 > O24.96 4.94 4.69 5.18 15.86 18.7524.73 > O34.82 4.83

Re: [HACKERS] WAL replay failure after file truncation(?)

2005-05-27 Thread Tom Lane
=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <[EMAIL PROTECTED]> writes: > My question is: What happens if the system is killed inside > rebuild_relation or inside swap_relfilenodes which is called by > rebuild_relation? Nothing at all, because the system catalog updates aren't committed yet, and we

Re: [HACKERS] foreign keys and RI triggers

2005-05-27 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Speaking of which, does anyone see a reason why RI_FKey_keyequal_upd() > is implemented as a pseudo-trigger function -- e.g. taking a pointer to > a TriggerData? Because (a) it needs all the same arguments and (b) it can share infrastructure with the oth

Re: [HACKERS] Cost of XLogInsert CRC calculations

2005-05-27 Thread Mark Cave-Ayland
> -Original Message- > From: Manfred Koizar [mailto:[EMAIL PROTECTED] > Sent: 25 May 2005 20:25 > To: Manfred Koizar > Cc: Tom Lane; Greg Stark; Bruce Momjian; Mark Cave-Ayland > (External); pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Cost of XLogInsert CRC calculations (cut)

Re: [HACKERS] Cost of XLogInsert CRC calculations

2005-05-27 Thread Mark Cave-Ayland
> -Original Message- > From: Manfred Koizar [mailto:[EMAIL PROTECTED] > Sent: 25 May 2005 20:25 > To: Manfred Koizar > Cc: Tom Lane; Greg Stark; Bruce Momjian; Mark Cave-Ayland > (External); pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Cost of XLogInsert CRC calculations (cu

[HACKERS] Multiple-statement Rules Incompatible With Constraints

2005-05-27 Thread Curt Sampson
I've got a table I've split into two, a portion that can be modified under normal circumstances, and a portion that can't be. (In a testing mode they both can be, but in production the user IDs doing the work don't have update or delete access on the immutable portion. BTW, I'm open to better way

Re: [HACKERS] Can we simplify win32 threading code

2005-05-27 Thread Magnus Hagander
> > > I assume that this will not break the use of pg_ctl to deliver > > > pseudo-signals. That would be a show-stopper. > > > > It shouldn't, but there is one concern: it has to be created in the > > global namespace. On older windows there is no different, but on > > modern windows with termin