[HACKERS] [PATCH] SE-PostgreSQL for v8.5 development (r1819)

2009-04-16 Thread KaiGai Kohei
The following list of patches are the latest SE-PostgreSQL (r1819). http://sepgsql.googlecode.com/files/sepgsql-01-sysatt-8.4beta1-r1819.patch http://sepgsql.googlecode.com/files/sepgsql-02-core-8.4beta1-r1819.patch http://sepgsql.googlecode.com/files/sepgsql-03-writable-8.4beta1-r1819.patch http:

Re: [HACKERS] [PATCH] unalias of ACL_SELECT_FOR_UPDATE

2009-04-16 Thread KaiGai Kohei
Heikki Linnakangas wrote: > KaiGai Kohei wrote: >> Currently, the ACL_SELECT_FOR_UPDATE privilege is defined as an alias >> of ACL_UPDATE as follows: >> >> at src/include/nodes/parsenodes.h: >>: >> /* Currently, SELECT ... FOR UPDATE/FOR SHARE requires UPDATE privileges */ >> #def

Re: [HACKERS] [PATCH] unalias of ACL_SELECT_FOR_UPDATE

2009-04-16 Thread Heikki Linnakangas
KaiGai Kohei wrote: > Currently, the ACL_SELECT_FOR_UPDATE privilege is defined as an alias > of ACL_UPDATE as follows: > > at src/include/nodes/parsenodes.h: >: > /* Currently, SELECT ... FOR UPDATE/FOR SHARE requires UPDATE privileges */ > #define ACL_SELECT_FOR_UPDATE ACL_UP

Re: [HACKERS] Lifetime of FmgrInfo

2009-04-16 Thread Tom Lane
Joshua Tolley writes: > It then does some work to determine whether the result in "function" is > valid or not. So I got to wondering, what's the lifetime of the > FunctionCallInfoinfo object passed to the call handler function? Query lifespan, usually. There are counterexamples on both sides, b

[HACKERS] [PATCH] unalias of ACL_SELECT_FOR_UPDATE

2009-04-16 Thread KaiGai Kohei
Currently, the ACL_SELECT_FOR_UPDATE privilege is defined as an alias of ACL_UPDATE as follows: at src/include/nodes/parsenodes.h: : /* Currently, SELECT ... FOR UPDATE/FOR SHARE requires UPDATE privileges */ #define ACL_SELECT_FOR_UPDATE ACL_UPDATE : It is unconfort

[HACKERS] Lifetime of FmgrInfo

2009-04-16 Thread Joshua Tolley
I was browsing PL/pgSQL source, and saw this line (pl_comp.c:151): function = (PLpgSQL_function *) fcinfo->flinfo->fn_extra It then does some work to determine whether the result in "function" is valid or not. So I got to wondering, what's the lifetime of the FunctionCallInfoinfo object passed to

Re: [HACKERS] HashJoin w/option to unique-ify inner rel

2009-04-16 Thread Robert Haas
> If HashAggregate is faster, then the question is can you make it better > by avoiding building the hash structure twice.  I haven't considered all > the possibilities, but the situation you have used as an example, an IN > query, seems workable.  Instead of translating to a hash > aggregate/hash/

Re: [HACKERS] HashJoin w/option to unique-ify inner rel

2009-04-16 Thread Robert Haas
On Thu, Apr 16, 2009 at 7:26 PM, Tom Lane wrote: > Robert Haas writes: >> Upon further review, it appears that a big part of this problem is >> that cost_hashjoin() doesn't understand that it needs cost semi-joins >> differently from inner or left joins. > > Yeah, I have a note to look into that

Re: [HACKERS] HashJoin w/option to unique-ify inner rel

2009-04-16 Thread Tom Lane
Robert Haas writes: > Upon further review, it appears that a big part of this problem is > that cost_hashjoin() doesn't understand that it needs cost semi-joins > differently from inner or left joins. Yeah, I have a note to look into that before 8.4 final. The same is true for nestloops: stoppin

Re: [HACKERS] HashJoin w/option to unique-ify inner rel

2009-04-16 Thread Lawrence, Ramon
> Upon further review, it appears that a big part of this problem is > that cost_hashjoin() doesn't understand that it needs cost semi-joins > differently from inner or left joins. The bogus logic looks to be > right here: > startup_cost += hash_qual_cost.startup; > run_cost += hash_qual_c

[HACKERS] postgres 8.4 beta1

2009-04-16 Thread Tiramisu Mokka
FYI, compiles on OpenSuSE 11.1 client works against 8.3.7 more information as soon as i will migrate date. -- kofeman

Re: [HACKERS] [rfc] unicode escapes for extended strings

2009-04-16 Thread Marko Kreen
On 4/16/09, Sam Mason wrote: > On Thu, Apr 16, 2009 at 08:48:58PM +0300, Marko Kreen wrote: > > Seems I'm bad at communicating in english, > > > I hope you're not saying this because of my misunderstandings! > > > > so here is C variant of > > my proposal to bring \u escaping into extended stri

Re: [HACKERS] [rfc] unicode escapes for extended strings

2009-04-16 Thread Sam Mason
On Thu, Apr 16, 2009 at 03:04:37PM -0400, Andrew Dunstan wrote: > Sam Mason wrote: > >Are you sure that this handling of surrogates is correct? The best > >answer I've managed to find on the Unicode consortium's site is: > > > > http://unicode.org/faq/utf_bom.html#utf16-7 > > > >it says: > > > >

Re: [HACKERS] [rfc] unicode escapes for extended strings

2009-04-16 Thread Andrew Dunstan
Sam Mason wrote: Are you sure that this handling of surrogates is correct? The best answer I've managed to find on the Unicode consortium's site is: http://unicode.org/faq/utf_bom.html#utf16-7 it says: They are invalid in interchange, but may be freely used internal to an implementati

Re: [HACKERS] [GENERAL] Performance of full outer join in 8.3

2009-04-16 Thread Grzegorz Jaskiewicz
On 16 Apr 2009, at 19:41, Merlin Moncure wrote: Is that because of how the output is formatted though, or because the concepts are difficult to express? (I agree though, json is better especially for structures that are possibly highly nested). What I mean is that what postgresql displays curre

Re: [HACKERS] [rfc] unicode escapes for extended strings

2009-04-16 Thread Sam Mason
On Thu, Apr 16, 2009 at 08:48:58PM +0300, Marko Kreen wrote: > Seems I'm bad at communicating in english, I hope you're not saying this because of my misunderstandings! > so here is C variant of > my proposal to bring \u escaping into extended strings. Reasons: > > - More people are familiar wi

Re: [HACKERS] [GENERAL] Performance of full outer join in 8.3

2009-04-16 Thread Merlin Moncure
On Thu, Apr 16, 2009 at 2:04 PM, Grzegorz Jaskiewicz wrote: > > On 16 Apr 2009, at 16:21, David Fetter wrote: > >> On Thu, Apr 16, 2009 at 06:12:10AM +0100, Simon Riggs wrote: >>> >>> I think the way to do this is to introduce plan output in XML >> >> If we're going with a serialization, which I t

Re: [HACKERS] [GENERAL] Performance of full outer join in 8.3

2009-04-16 Thread Grzegorz Jaskiewicz
On 16 Apr 2009, at 16:21, David Fetter wrote: On Thu, Apr 16, 2009 at 06:12:10AM +0100, Simon Riggs wrote: I think the way to do this is to introduce plan output in XML If we're going with a serialization, which I think would be an excellent idea, how about one that's light-weight and human

[HACKERS] [rfc] unicode escapes for extended strings

2009-04-16 Thread Marko Kreen
Seems I'm bad at communicating in english, so here is C variant of my proposal to bring \u escaping into extended strings. Reasons: - More people are familiar with \u escaping, as it's standard in Java/C#/Python, probably more.. - U& strings will not work when stdstr=off. Syntax: \u

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Tom Lane
Sam Mason writes: > I've failed to keep up with the discussion so I'm not sure where this > conversation has got to! Is the consensus for 8.4 to enable SQL2003 > style U&lit escaped literals if and only if standard_conforming_strings > is set? That was Peter's proposal, and no one's shot a hole

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Sam Mason
On Thu, Apr 16, 2009 at 06:34:06PM +0300, Marko Kreen wrote: > Which hints that you can aswell enter the pairs directly: \uxx\uxx. > If I'd be language designer, I would not see any reason to disallow it. > > And anyway, at least mono seems to support it: > > using System; > public class HelloWor

Re: [HACKERS] [GENERAL] Performance of full outer join in 8.3

2009-04-16 Thread Tom Lane
Robert Haas writes: > I think XML explain output is a good idea, but I don't think it's a > substitute for better options to control the human-readable form. Yeah. I think a well-designed XML output format for EXPLAIN is a fine thing to work on, but I don't believe it would make the "create a pl

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Marko Kreen
On 4/16/09, Tom Lane wrote: > Sam Mason writes: > > I'd never heard of UTF-16 surrogate pairs before this discussion and > > hence didn't realise that it's valid to have a surrogate pair in place > > of a single code point. The docs say that corresponds to > > U+10302, Python would appear t

Re: [HACKERS] Postgres SQL specification (tests)

2009-04-16 Thread mito
By table structure i mean table definition options. Kevin Field wrote: On Apr 16, 3:14 am, mito wrote: Hi, i have built an SQL interface using rule system which supports row versioning and i would like to test it against Postgres SQL specification. Is there something like test cases for post

Re: [HACKERS] [GENERAL] Performance of full outer join in 8.3

2009-04-16 Thread Robert Haas
On Thu, Apr 16, 2009 at 11:21 AM, David Fetter wrote: > If we're going with a serialization, which I think would be an > excellent idea, how about one that's light-weight and human-readable > like JSON? Wow, that's a great idea for another option to EXPLAIN. Wouldn't it be nice if EXPLAIN suppor

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Andrew Dunstan
Tom Lane wrote: Sam Mason writes: I'd never heard of UTF-16 surrogate pairs before this discussion and hence didn't realise that it's valid to have a surrogate pair in place of a single code point. The docs say that corresponds to U+10302, Python would appear to follow my intuitions in t

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Marko Kreen
On 4/16/09, Sam Mason wrote: > On Thu, Apr 16, 2009 at 02:47:20PM +0300, Marko Kreen wrote: > > On 4/16/09, Sam Mason wrote: > > > Microsoft have also gone this way in C#, named code points are not > > > supported however. > > > > And it handles also non-BMP codepoints with \u escape similarl

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Sam Mason
On Thu, Apr 16, 2009 at 10:54:16AM -0400, Tom Lane wrote: > Sam Mason writes: > > I'd never heard of UTF-16 surrogate pairs before this discussion and > > hence didn't realise that it's valid to have a surrogate pair in place > > of a single code point. The docs say that corresponds to > > U+103

Re: [HACKERS] [GENERAL] Performance of full outer join in 8.3

2009-04-16 Thread David Fetter
On Thu, Apr 16, 2009 at 06:12:10AM +0100, Simon Riggs wrote: > > > > EXPLAIN (option_name, ...) query > > > > Or maybe: > > > > EXPLAIN (option_name = value, ...) query > > > > It may or may not be the case that generating a useful regression > > test suite for the planner is too much work for

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Tom Lane
Sam Mason writes: > I'd never heard of UTF-16 surrogate pairs before this discussion and > hence didn't realise that it's valid to have a surrogate pair in place > of a single code point. The docs say that corresponds to > U+10302, Python would appear to follow my intuitions in that: > ord(u'

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Sam Mason
On Thu, Apr 16, 2009 at 02:47:20PM +0300, Marko Kreen wrote: > On 4/16/09, Sam Mason wrote: > > Microsoft have also gone this way in C#, named code points are not > > supported however. > > And it handles also non-BMP codepoints with \u escape similarly: > > http://en.csharp-online.net/ECMA-33

Re: [HACKERS] Yet another regression issue with Fedora-10 + PG 8.4 beta1

2009-04-16 Thread Devrim GÜNDÜZ
On Tue, 2009-04-14 at 18:32 -0400, Tom Lane wrote: > Any ideas what might have caused it? > > QEMU screwing up the handling of floating-point traps, perhaps? Probably. Let me dig it. Thanks. -- Devrim GÜNDÜZ, RHCE devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr

Re: [HACKERS] NOTIFY / LISTEN silently parses and discards schema-ish portion of notification name ...

2009-04-16 Thread James Robinson
On Apr 16, 2009, at 6:51 AM, pgsql-hackers-ow...@postgresql.org wrote: Considered unexpected behavior, or at least in its undocumented form. If value given to NOTIFY seems schema-qualified, the schema qualification is eroded by the time it is presented to the listener -- See: http://archi

Re: [HACKERS] Postgres SQL specification (tests)

2009-04-16 Thread Kevin Field
On Apr 16, 3:14 am, mito wrote: > Hi, > > i have built an SQL interface using rule system which supports row > versioning and i would like to test it against Postgres SQL specification. > > Is there something like test cases for postgres SQL interface? > > Or do you have any ideas how to build a g

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Andrew Dunstan
Tatsuo Ishii wrote: I could live with either. Wikipedia says: "The characters outside the first plane usually have very specialized or rare use." For years we rejected all characters beyond the first plane, and while that's fixed now, the volume of complaints wasn't huge. I you mean "

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Marko Kreen
On 4/16/09, Sam Mason wrote: > On Wed, Apr 15, 2009 at 11:19:42PM +0300, Marko Kreen wrote: > > On 4/15/09, Tom Lane wrote: > > > > Given Martijn's complaint about more-than-16-bit code points, I think > > > the \u proposal is not mature enough to go into 8.4. We can think > > > about some

Re: [HACKERS] [GENERAL] Performance of full outer join in 8.3

2009-04-16 Thread Robert Haas
2009/4/16 Simon Riggs : > On Wed, 2009-04-15 at 20:58 -0400, Robert Haas wrote: >> On Wed, Apr 15, 2009 at 7:39 PM, Tom Lane wrote: >> > The output of EXPLAIN is nowhere near stable enough to use within the >> > current exact-match regression test framework.  I'm not sure it would >> > be stable e

Re: [HACKERS] Unicode string literals versus the world

2009-04-16 Thread Sam Mason
On Wed, Apr 15, 2009 at 11:19:42PM +0300, Marko Kreen wrote: > On 4/15/09, Tom Lane wrote: > > Given Martijn's complaint about more-than-16-bit code points, I think > > the \u proposal is not mature enough to go into 8.4. We can think > > about some version of that later, if there's enough inte

[HACKERS] Postgres SQL specification (tests)

2009-04-16 Thread mito
Hi, i have built an SQL interface using rule system which supports row versioning and i would like to test it against Postgres SQL specification. Is there something like test cases for postgres SQL interface? Or do you have any ideas how to build a group of all possible cases of table struct

Re: [HACKERS] New trigger option of pg_standby

2009-04-16 Thread Fujii Masao
Hi Simon, Thanks for the comments! On Thu, Apr 16, 2009 at 2:56 AM, Simon Riggs wrote: > > On Wed, 2009-04-15 at 17:02 +0900, Fujii Masao wrote: > >> On Tue, Apr 14, 2009 at 2:41 PM, Fujii Masao wrote: >> > I'd like to propose another simple idea; pg_standby deletes the >> > trigger file *whene