[HACKERS] PL/Perl translation, croak

2009-02-17 Thread Peter Eisentraut
plperl's nls.mk contains GETTEXT_TRIGGERS:= _ errmsg errdetail errdetail_log errhint errcontext write_stderr croak Perl_croak As far as I can tell, croak() and Perl_croak() are provided by the Perl library. So it is quite unclear to me how we expect their argument strings to be translated

Re: [HACKERS] Questions about parsing boolean and casting to anyelement

2009-02-17 Thread Sam Mason
On Mon, Feb 16, 2009 at 08:03:33PM -0500, Tom Lane wrote: ITAGAKI Takahiro itagaki.takah...@oss.ntt.co.jp writes: I hope anyelement could be used in cast because casts are supported by almost programming languages where template or generics are available. Programming languages with generics

Re: [HACKERS] [BUGS] BUG #4660: float functions return -0

2009-02-17 Thread Bruce Momjian
Tom Lane wrote: ITAGAKI Takahiro itagaki.takah...@oss.ntt.co.jp writes: We already have some codes to avoid -0 float8um (unary minus), but there are no protection in trunc(), ceil() and round() at least. I looked into the CVS history to find out when the anti-minus-zero code got put into

Re: [HACKERS] [BUGS] BUG #4660: float functions return -0

2009-02-17 Thread Gregory Stark
Tom Lane t...@sss.pgh.pa.us writes: The CVS commit message says Check for zero in unary minus floating point code (IEEE allows an explicit negative zero which looks ugly in a query result!). I'm of the opinion that minus zero was put into the IEEE floating point standard by

Re: [HACKERS] differnce from ansi sql standard - unicode strings?

2009-02-17 Thread Peter Eisentraut
Pavel Stehule wrote: I found BNF for SQL 2003 and I found there some small difference. Standard use keyword ESCAPE, but PostgreSQL use keybord UESCAPE. Anybody knows reason? Unicode character string literal::= [ introducer character set specification ] U ampersand quote

Re: [HACKERS] differnce from ansi sql standard - unicode strings?

2009-02-17 Thread Pavel Stehule
Hi, It's possible - I used unofficial BNF graph from internet. so problem is on my side. thank you Pavel 2009/2/17 Peter Eisentraut pete...@gmx.net: Pavel Stehule wrote: I found BNF for SQL 2003 and I found there some small difference. Standard use keyword ESCAPE, but PostgreSQL use

Re: [HACKERS] Questions about parsing boolean and casting to anyelement

2009-02-17 Thread Tom Lane
I wrote: ITAGAKI Takahiro itagaki.takah...@oss.ntt.co.jp writes: I hope anyelement could be used in cast because casts are supported by almost programming languages where template or generics are available. I think what you're suggesting is that inside a polymorphic function, anyelement

Re: [HACKERS] pg_migrator and handling dropped columns

2009-02-17 Thread Bruce Momjian
Applied. --- Bruce Momjian wrote: Peter Eisentraut wrote: Tom Lane wrote: Is this acceptable to everyone? We could name the option -u/--upgrade-compatible. If the switch is specifically for pg_upgrade

Re: [HACKERS] [BUGS] BUG #4660: float functions return -0

2009-02-17 Thread Tom Lane
Gregory Stark st...@enterprisedb.com writes: Tom Lane t...@sss.pgh.pa.us writes: I'm of the opinion that minus zero was put into the IEEE floating point standard by people who know a great deal more about the topic than anyone on this list does, and that we do not have the expertise to be

Re: [HACKERS] PL/Perl translation, croak

2009-02-17 Thread Alvaro Herrera
Peter Eisentraut wrote: plperl's nls.mk contains GETTEXT_TRIGGERS:= _ errmsg errdetail errdetail_log errhint errcontext write_stderr croak Perl_croak As far as I can tell, croak() and Perl_croak() are provided by the Perl library. So it is quite unclear to me how we expect their

Re: [HACKERS] PL/Perl translation, croak

2009-02-17 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Peter Eisentraut wrote: plperl's nls.mk contains GETTEXT_TRIGGERS:= _ errmsg errdetail errdetail_log errhint errcontext write_stderr croak Perl_croak As far as I can tell, croak() and Perl_croak() are provided by the Perl library. So

[HACKERS] vacuumdb --freeze

2009-02-17 Thread Bruce Momjian
I would like to add a --freeze parameter to vacuumdb for use by the binary upgrade utility, and for symmetry with the existing VACUUM options; patch attached. I could also accomplish with with PGOPTIONs but this seem like a cleaner solution. -- Bruce Momjian br...@momjian.us

Re: [HACKERS] Synch Replication

2009-02-17 Thread Czichy, Thoralf (NSN - FI/Helsinki)
hi, [I am working in the same team as Niranjan] Niranjan wrote: 3) Do you have test programs that can used for synchronous replication testing? No, I've not used the automated test program. Yeah, since it's very useful, I'll make it before long. 4) I'am thinking of trying

[HACKERS] Re: [COMMITTERS] pgsql: Redefine _() to dgettext() instead of gettext() so that it uses

2009-02-17 Thread Alvaro Herrera
Peter Eisentraut wrote: Log Message: --- Redefine _() to dgettext() instead of gettext() so that it uses the plpgsql text domain, instead of the postgres one (or whatever the default may be). Hmm, so is this needed on all other PLs too? -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [GENERAL] Good Delimiter for copy command

2009-02-17 Thread David Fetter
On Tue, Feb 17, 2009 at 05:17:40PM +0100, Marco Colombo wrote: Tom Lane wrote: Andrew Gould andrewlylego...@gmail.com writes: To the list: Does pg_dump escape characters that are the same as the delimiter? Yes. The OP has not actually explained why he needs to pick a nondefault

Re: [HACKERS] [BUGS] BUG #4660: float functions return -0

2009-02-17 Thread Brendan Jurd
On Wed, Feb 18, 2009 at 2:57 AM, Tom Lane t...@sss.pgh.pa.us wrote: The point I'm trying to make is that we should deliver IEEE-compliant results if we are on a platform that complies with the spec. Right down to the minus sign. If that surprises people who are unfamiliar with the spec,

Re: [HACKERS] Questions about parsing boolean and casting to anyelement

2009-02-17 Thread Brendan Jurd
On Wed, Feb 18, 2009 at 2:40 AM, Tom Lane t...@sss.pgh.pa.us wrote: After thinking about it for awhile, I don't like the notation anyway --- it's not immediately obvious that a cast to anyelement should mean something like that. What seems more sensible to me is to introduce a function to get

Re: [HACKERS] Questions about parsing boolean and casting to anyelement

2009-02-17 Thread Tom Lane
Brendan Jurd dire...@gmail.com writes: On Wed, Feb 18, 2009 at 2:40 AM, Tom Lane t...@sss.pgh.pa.us wrote: After thinking about it for awhile, I don't like the notation anyway --- it's not immediately obvious that a cast to anyelement should mean something like that. What seems more sensible

Re: [HACKERS] [GENERAL] Good Delimiter for copy command

2009-02-17 Thread Tom Lane
David Fetter da...@fetter.org writes: On Tue, Feb 17, 2009 at 05:17:40PM +0100, Marco Colombo wrote: Is it possibile to use some unicode character which is unlikely to appear in the data set as delimiter? Something like U+FFFC. No. The delimiter needs to be one byte long at the moment. The

Re: [HACKERS] Questions about parsing boolean and casting to anyelement

2009-02-17 Thread Pavel Stehule
2009/2/17 Tom Lane t...@sss.pgh.pa.us: I wrote: ITAGAKI Takahiro itagaki.takah...@oss.ntt.co.jp writes: I hope anyelement could be used in cast because casts are supported by almost programming languages where template or generics are available. I think what you're suggesting is that inside

Re: [HACKERS] SE-PostgreSQL and row level security

2009-02-17 Thread Josh Berkus
All, I thought we'd agreed to compromise on having SE without row-level in 8.4, and working on SE with row-level in 8.5. Why are we revisiting this argument? 8.4 is *already* late; arguing further about the terms of SE simply risk us being forced to reject it entirely. --Josh -- Sent via

Re: [HACKERS] SE-PostgreSQL and row level security

2009-02-17 Thread Pavel Stehule
2009/2/17 Josh Berkus j...@agliodbs.com: All, I thought we'd agreed to compromise on having SE without row-level in 8.4, and working on SE with row-level in 8.5. Why are we revisiting this argument? 8.4 is *already* late; arguing further about the terms of SE simply risk us being forced to

[HACKERS] Restore frozen xids for binary upgrades

2009-02-17 Thread Bruce Momjian
The attached patch adds to pg_dumpall --binary-upgrade by restoring information about frozen xids for relations and databases. I think this is the last patch I need to complete my TODO items for the pg_migrator binary upgrade utility. -- Bruce Momjian br...@momjian.us

Re: [HACKERS] Questions about parsing boolean and casting to anyelement

2009-02-17 Thread Tom Lane
I wrote: In the meantime I'm more convinced than ever that we should throw an error for attempting such a cast. If people are imagining that it will do something like that, we need to disillusion them. BTW, I wrote up what I thought was a trivial patch to make this happen, and promptly got a

Re: [HACKERS] vacuumdb --freeze

2009-02-17 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: I would like to add a --freeze parameter to vacuumdb for use by the binary upgrade utility, and for symmetry with the existing VACUUM options; patch attached. Exactly what do you think the upgrade utility is going to do with it? Surely not a

Re: [HACKERS] vacuumdb --freeze

2009-02-17 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: I would like to add a --freeze parameter to vacuumdb for use by the binary upgrade utility, and for symmetry with the existing VACUUM options; patch attached. Exactly what do you think the upgrade utility is going to do with it?

[HACKERS] regression test crashes at tsearch

2009-02-17 Thread Hiroshi Inoue
Hi, I see a regression test failure in my mingw-vista port when I invoke the command make check MULTIBYTE=euc_jp NO_LOCALE=yes . It causes a crash at tsearch. The crash seems to occur when the server encoding isn't UTF-8 with no locale. The attached is a patch to avoid the crash. regards,

Re: [HACKERS] SE-PostgreSQL and row level security

2009-02-17 Thread KaiGai Kohei
Pavel Stehule wrote: 2009/2/17 Josh Berkus j...@agliodbs.com: All, I thought we'd agreed to compromise on having SE without row-level in 8.4, and working on SE with row-level in 8.5. Why are we revisiting this argument? 8.4 is *already* late; arguing further about the terms of SE simply risk

Re: [HACKERS] [BUGS] BUG #4660: float functions return -0

2009-02-17 Thread Tom Lane
Brendan Jurd dire...@gmail.com writes: On Wed, Feb 18, 2009 at 2:57 AM, Tom Lane t...@sss.pgh.pa.us wrote: The point I'm trying to make is that we should deliver IEEE-compliant results if we are on a platform that complies with the spec. Right down to the minus sign. If that surprises people

Re: [HACKERS] The science of optimization in practical terms?

2009-02-17 Thread decibel
On Feb 15, 2009, at 9:54 PM, Robert Haas wrote: On Sun, Feb 15, 2009 at 1:16 PM, Greg Smith gsm...@gregsmith.com wrote: On Fri, 13 Feb 2009, Robert Haas wrote: This seems plausible, but I'm not totally sold: predicting the contents of the operating system buffer cache sounds like it might be

Re: [HACKERS] The science of optimization in practical terms?

2009-02-17 Thread Robert Haas
Actually, a simple algorithm that might work really well would be to calculate relation cache odds as ( number of page accesses for relation / number of page accesses for all relations ) * ( sum(relpages)*BLKSZ / eff_cache_size ), where number of page accesses would be both from relcache and

Re: [Pljava-dev] [HACKERS] Re: Should creating a new base type require superuser status?

2009-02-17 Thread Kris Jurka
On Sat, 2 Aug 2008, Tom Lane wrote: So what exactly does happen when the user deliberately specifies wrong typlen/typbyval/typalign info when creating a type based on PL/Java functions? I have reviewed pljava's handling of misrepresented alignment, length, and by value parameters 1)

Re: [Pljava-dev] [HACKERS] Re: Should creating a new base type require superuser status?

2009-02-17 Thread Thomas Hallgren
Kris Jurka wrote: 3) By value: pljava does not correctly handle passed by value types correctly, allowing access to random memory. This is simply not true. There's no way a Java developer can access random memory through PL/Java. - thomas -- Sent via pgsql-hackers mailing list

Re: [HACKERS] The science of optimization in practical terms?

2009-02-17 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I'm interested to know whether anyone else shares my belief that nested loops are the cause of most really bad plans. What usually happens to me is that the planner develops some unwarranted optimism about the number of rows likely to be generated by

Re: [Pljava-dev] [HACKERS] Re: Should creating a new base type require superuser status?

2009-02-17 Thread Kris Jurka
Thomas Hallgren wrote: Kris Jurka wrote: 3) By value: pljava does not correctly handle passed by value types correctly, allowing access to random memory. This is simply not true. There's no way a Java developer can access random memory through PL/Java. No, the point is that the Java