Re: [HACKERS] Windowing Function Patch Review -> Standard Conformance

2008-12-27 Thread Hitoshi Harada
2008/12/28 Tom Lane : > I've spent quite a bit of time reviewing the window functions patch, > and I think it is now ready to commit, other than the documentation > (which I've not looked at yet at all). Attached is my current patch > against HEAD, sans documentation. This incorporates the recent

Re: [HACKERS] Frames vs partitions: is SQL2008 completely insane?

2008-12-27 Thread Tom Lane
"David Rowley" writes: > Hitoshi Harada wrote: >> I tested on Oracle 10.2.0, and the results are: >> ... >> which means the section 4.15 is true. Could anyone try DB2? > DB2 9.5 results [ are the same ] OK, good, that means the reference to the frame in 6.10 rule 1b is just a copy-and-pasteo. (

Re: [HACKERS] Frames vs partitions: is SQL2008 completely insane?

2008-12-27 Thread David Rowley
Hitoshi Harada wrote: > I tested on Oracle 10.2.0, and the results are: > > select depname, empno, salary, > lead(salary, 1) over (order by salary), > lag(salary, 1) over (order by salary), > first_value(salary) over (order by salary), > last_value(salary) over (order by salary) > from empsalary;

Re: [HACKERS] Frames vs partitions: is SQL2008 completely insane?

2008-12-27 Thread David Rowley
Hitoshi Harada wrote: > I tested on Oracle 10.2.0, and the results are: > > select depname, empno, salary, > lead(salary, 1) over (order by salary), > lag(salary, 1) over (order by salary), > first_value(salary) over (order by salary), > last_value(salary) over (order by salary) > from empsalary;

Re: [HACKERS] Proposed Patch to Improve Performance of Multi-BatchHash Join for Skewed Data Sets

2008-12-27 Thread Lawrence, Ramon
> -Original Message- > From: Robert Haas [mailto:robertmh...@gmail.com] > I looked at this some more. I'm a little concerned about the way > we're maintaining the in-memory hash table. Since the highest legal > statistics target is now 10,000, it's possible that we could have two > orders

Re: [HACKERS] new libpq SSL connection option

2008-12-27 Thread Andrew Chernow
Why does pqGetHomeDirectory have to succeed to use conn->sslrootcert. Maybe this should be an OR of the two since sslrootcert is not dependent on homedir? around line 970 src/interfaces/libpq/fe-secure.c if (conn->sslrootcert || pqGetHomeDirectory(homedir, sizeof(homedir))) -- Andrew Chernow

Re: [HACKERS] Frames vs partitions: is SQL2008 completely insane?

2008-12-27 Thread Ron Mayer
Hitoshi Harada wrote: > 2008/12/28 Tom Lane : >> "Hitoshi Harada" writes: >>> 2008/12/27 Tom Lane : which doesn't conform to spec AFAICS ... >>> 4.15...says: >> interesting...6.10 general rule 1b, which very clearly states ... >> ... 4.15 does seem like evidence that the spec authors may

Re: [HACKERS] Frames vs partitions: is SQL2008 completely insane?

2008-12-27 Thread Hitoshi Harada
2008/12/28 Tom Lane : > "Hitoshi Harada" writes: >> 2008/12/27 Tom Lane : >>> I notice that the current patch code seems to implement >>> first/last/nth_value using the frame, but lead/lag using the partition, >>> which doesn't conform to spec AFAICS ... > >> In 4.15, it says: > >> The lead and la

Re: [HACKERS] Frames vs partitions: is SQL2008 completely insane?

2008-12-27 Thread Tom Lane
"Hitoshi Harada" writes: > 2008/12/27 Tom Lane : >> I notice that the current patch code seems to implement >> first/last/nth_value using the frame, but lead/lag using the partition, >> which doesn't conform to spec AFAICS ... > In 4.15, it says: > The lead and lag functions each take three argu

Re: [HACKERS] Window-functions patch handling of aggregates

2008-12-27 Thread Hitoshi Harada
2008/12/27 Tom Lane : > "Robert Haas" writes: >> Unfortunately, if we don't want to add an explicit iswindowable flag >> (and I understand that that's ugly), then I think this is the way to >> go. It's a shame that people will have to make code changes, but >> inventing a fake AggState object jus

Re: [HACKERS] Frames vs partitions: is SQL2008 completely insane?

2008-12-27 Thread Hitoshi Harada
2008/12/27 Tom Lane : > I notice that the current patch code seems to implement > first/last/nth_value using the frame, but lead/lag using the partition, > which doesn't conform to spec AFAICS ... but lead/lag on the frame > doesn't actually appear to be a useful definition so I'd rather go > with

Re: [HACKERS] Tuplestore trimming in window-functions patch

2008-12-27 Thread Hitoshi Harada
2008/12/27 Tom Lane : > The last bit of performance-related hacking that seems to be needed in > the window functions patch is to fix things so that we can trim old > rows from the underlying tuplestore when they're no longer needed. > In particular I think it's critical to be able to do this for t

[HACKERS] pg_start_backup without checkpoint patch (a part of Synch Rep)

2008-12-27 Thread Fujii Masao
Hi, Attached is the self-contained patch to skip checkpoint at pg_start_backup. This is a part of Synch Rep patches, and was discussed in the following thread. http://archives.postgresql.org/message-id/3f0b79eb0812240710j7e613f3atfd6b6fc274035...@mail.gmail.com In Synch Rep, we basically have to