Re: [HACKERS] Core team statement on replication in PostgreSQL

2008-06-02 Thread Robert Hodges
Hi Hannu, Hi Hannu, On 6/1/08 2:14 PM, Hannu Krosing [EMAIL PROTECTED] wrote: As a consequence, I don¹t see how you can get around doing some sort of row-based replication like all the other databases. Is'nt WAL-base replication some sort of row-based replication ? Yes, in theory.

Re: [HACKERS] Table rewrites vs. pending AFTER triggers

2008-06-02 Thread Robert Hodges
Hi Gokul, If you are saying that DDL should be auto-commit, yes, this really does limit some use cases. Transactional DDL is quite helpful for SQL generators, which need to avoid leaving schema half-changed if the application crashes or there¹s a problem with the database that causes a command

Re: [HACKERS] Add dblink function to check if a named connection exists

2008-06-02 Thread Asko Oja
Just use plproxy and skip all the hassle of dblink :) On Mon, Jun 2, 2008 at 3:14 AM, Joe Conway [EMAIL PROTECTED] wrote: Tom Lane wrote: Tommy Gildseth [EMAIL PROTECTED] writes: One obvious disadvantage of this approach, is that I need to connect and disconnect in every function. A

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Dave Page
On Mon, Jun 2, 2008 at 5:46 AM, Joshua D. Drake [EMAIL PROTECTED] wrote: I've seen people not doing so more often than you would think. Perhaps because they are DBAs and not sysadmins? I also meant a tool to do things like verify that the changes are valid, as someone else mentioned

Re: [HACKERS] [0/4] Proposal of SE-PostgreSQL patches

2008-06-02 Thread Dawid Kuroczko
On Wed, May 7, 2008 at 7:52 AM, KaiGai Kohei [EMAIL PROTECTED] wrote: Tom, Thanks for your reviewing. The patch hasn't got a mode in which SELinux support is compiled in but not active. This is a good way to ensure that no one will ever ship standard RPMs with the feature compiled in, because

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Greg Smith
On Sun, 1 Jun 2008, Peter Eisentraut wrote: Josh Berkus wrote: 1. Most people have no idea how to set these. Could you clarify this? I can't really believe that people are incapable of editing a configuration file. The big problem isn't the editing, it's knowing what to set the

[HACKERS] Re: [ANNOUNCE] == PostgreSQL Weekly News - June 01 2008 ==

2008-06-02 Thread Kaare Rasmussen
David Fetter writes: Alter the xxx_pattern_ops opclasses to use the regular equality operator of the associated datatype as their equality member. This means that these opclasses can now support plain equality comparisons along with LIKE tests, thus avoiding the need for an extra index in some

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Greg Smith
On Sun, 1 Jun 2008, Joshua D. Drake wrote: Well I don't know that a minimum of comments is what I am arguing as much as not too much comments. Josh's proposal included making three levels of documentation-level comments available: terse, normal, and verbose. The verbose comment level

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Stephen R. van den Berg
Greg Smith wrote: Joshua has been banging a drum for a while now that all this data needs to get pushing into the database itself. The GUCS data is clearly structured tables, you'll open up the potential to add a whole new class of user-friendly applications for making configuration easier to

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread Andrew Sullivan
On Sun, Jun 01, 2008 at 10:13:07PM -0700, David E. Wheeler wrote: What locale is right? If I have a Web app, there could be data in many different languages in a single table/column. I think the above amounts to a need for per-session locale settings or something, no? A -- Andrew Sullivan

Re: [HACKERS] Table rewrites vs. pending AFTER triggers

2008-06-02 Thread Andrew Sullivan
On Sun, Jun 01, 2008 at 11:51:29PM -0700, Robert Hodges wrote: If you are saying that DDL should be auto-commit, yes, this really does limit some use cases. I agree. Transactional DDL is a big feature I'd hate to see go away. Oracle DBAs I know look with envy on this feature of Postgres.

Re: [HACKERS] [GENERAL] Fragments in tsearch2 headline

2008-06-02 Thread Teodor Sigaev
I have attached a new patch with respect to the current cvs head. This produces headline in a document for a given query. Basically it identifies fragments of text that contain the query and displays them. New variant is much better, but... HeadlineParsedText contains an array of actual

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Tom Lane
Greg Smith [EMAIL PROTECTED] writes: Joshua has been banging a drum for a while now that all this data needs to get pushing into the database itself. This is, very simply, not going to happen. Shall we go over the reasons why not, one more time? 1. Quite a few of the GUC parameters are

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Stephen R. van den Berg
Tom Lane wrote: Greg Smith [EMAIL PROTECTED] writes: Joshua has been banging a drum for a while now that all this data needs to get pushing into the database itself. This is, very simply, not going to happen. Shall we go over the reasons why not, one more time? 1. Quite a few of the GUC

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread David E. Wheeler
On Jun 2, 2008, at 06:51, Andrew Sullivan wrote: On Sun, Jun 01, 2008 at 10:13:07PM -0700, David E. Wheeler wrote: What locale is right? If I have a Web app, there could be data in many different languages in a single table/column. I think the above amounts to a need for per-session

Re: [HACKERS] phrase search

2008-06-02 Thread Teodor Sigaev
I have attached a patch for phrase search with respect to the cvs head. Basically it takes a a phrase (text) and a TSVector. It checks if the relative positions of lexeme in the phrase are same as in their positions in TSVector. Ideally, phrase search should be implemented as new operator in

[HACKERS] Proposal: new function array_init

2008-06-02 Thread Pavel Stehule
Hello There was more time questions about array's initialisation. I propose function array_init. CREATE OR REPLACE FUNCTION array_init(sizes int[], v anyelement) RETURNS anyarray; First parameter is array of dimension's sizes. Second argument is value that will be used for initialisation.

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Jignesh K. Shah
Simon Riggs wrote: Some other problems I see with GUCs * It's not possible to set one parameter depending upon the setting of another. To me this is more critical.. Most people I have seen will increase one or few but not all parameters related to memory which can result in loss of

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread David E. Wheeler
On Jun 1, 2008, at 21:08, Tom Lane wrote: 1. Does the use of the tolower() C function in the citext data type on pgfoundry basically give me the same results as using lower() in my SQL has for all these years? [ broken record... ] Kinda depends on your locale. However, tolower() is

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Greg Smith
On Mon, 2 Jun 2008, Jignesh K. Shah wrote: Most people I have seen will increase one or few but not all parameters related to memory which can result in loss of performance and productivity in figuring out. If it becomes easier to build a simple tool available to help people tune their

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread Tom Lane
David E. Wheeler [EMAIL PROTECTED] writes: On Jun 1, 2008, at 21:08, Tom Lane wrote: [ broken record... ] Kinda depends on your locale. However, tolower() is 100% guaranteed not to work for multibyte encodings, so citext is quite useless if you're using UTF8. This is fixable, no doubt,

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Greg Smith
On Mon, 2 Jun 2008, Tom Lane wrote: Greg Smith [EMAIL PROTECTED] writes: Joshua has been banging a drum for a while now that all this data needs to get pushing into the database itself. This is, very simply, not going to happen. Right, there are also technical challenges in the way of that

Re: [HACKERS] Proposal: new function array_init

2008-06-02 Thread Tom Lane
Pavel Stehule [EMAIL PROTECTED] writes: There was more time questions about array's initialisation. I propose function array_init. CREATE OR REPLACE FUNCTION array_init(sizes int[], v anyelement) RETURNS anyarray; I think this is basically a good idea, but maybe the API needs a bit of

Re: [HACKERS] Core team statement on replication in PostgreSQL

2008-06-02 Thread Chris Browne
[EMAIL PROTECTED] (Andreas 'ads' Scherbaum) writes: On Thu, 29 May 2008 23:02:56 -0400 Andrew Dunstan wrote: Well, yes, but you do know about archive_timeout, right? No need to wait 2 hours. Then you ship 16 MB binary stuff every 30 second or every minute but you only have some kbyte real

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Simon Riggs
On Mon, 2008-06-02 at 11:59 -0400, Jignesh K. Shah wrote: Simon Riggs wrote: Some other problems I see with GUCs * It's not possible to set one parameter depending upon the setting of another. To me this is more critical.. Most people I have seen will increase one or few

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread David E. Wheeler
On Jun 2, 2008, at 09:33, Tom Lane wrote: Would the use of str_tolower() in formatting.c fix that? Yeah, you need something equivalent to that. I think that whole area is due for refactoring, though --- we've got kind of a weird collection of upper/lower/initcap APIs spread through a

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread Jeff Davis
On Mon, 2008-06-02 at 09:51 -0400, Andrew Sullivan wrote: On Sun, Jun 01, 2008 at 10:13:07PM -0700, David E. Wheeler wrote: What locale is right? If I have a Web app, there could be data in many different languages in a single table/column. I think the above amounts to a need for

Re: [HACKERS] Core team statement on replication in PostgreSQL

2008-06-02 Thread Hannu Krosing
On Thu, 2008-05-29 at 23:37 +0200, Mathias Brossard wrote: I pointed out that the NTT solution is synchronous because Tom said in the first part of his email that: In practice, simple asynchronous single-master-multiple-slave replication covers a respectable fraction of use cases, so

Re: [HACKERS] Proposal: new function array_init

2008-06-02 Thread Webb Sprague
On Mon, Jun 2, 2008 at 9:46 AM, Tom Lane [EMAIL PROTECTED] wrote: Pavel Stehule [EMAIL PROTECTED] writes: There was more time questions about array's initialisation. I propose function array_init. As one of the questioners, I will give some short thoughts below. CREATE OR REPLACE FUNCTION

Re: [HACKERS] Add dblink function to check if a named connection exists

2008-06-02 Thread Tommy Gildseth
Joe Conway wrote: If you really want the notational simplicity, you could use an SQL function to wrap it: CREATE OR REPLACE FUNCTION dblink_exists(text) RETURNS bool AS $$ SELECT $1 = ANY (dblink_get_connections()) $$ LANGUAGE sql; Thanks, that seems like a reasonable way to solve

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread Martijn van Oosterhout
On Mon, Jun 02, 2008 at 10:29:30AM -0700, Jeff Davis wrote: I think if you want some special treatment of text for some users, it should be explicit. Text in one locale is really a different type from text in another locale, and so changing the locale of some text variable is really a

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread Jeff Davis
On Mon, 2008-06-02 at 19:55 +0200, Martijn van Oosterhout wrote: The SQL COLLATE syntax handles this just fine. Either the original COLLATE patch or the new one will let people tags strings with any collation they like. http://wiki.postgresql.org/wiki/Todo:Collate The last reference I see on

Re: [HACKERS] Overhauling GUCS

2008-06-02 Thread Josh Berkus
Greg, Like some of the other GUC simplification ideas that show up sometimes (unifying all I/O and limiting background processes based on that total is another), this is hard to do internally.  Josh's proposal has a fair amount of work involved, but the code itself doesn't need to be clever

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread Jeff Davis
On Sun, 2008-06-01 at 22:13 -0700, David E. Wheeler wrote: What locale is right? If I have a Web app, there could be data in many different languages in a single table/column. I think the values should be explicitly treated differently. It would be nice if you could just typecast, like:

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread Andrew Sullivan
On Mon, Jun 02, 2008 at 10:29:30AM -0700, Jeff Davis wrote: What if you had a CHECK constraint that was locale-sensitive? Would the constraint only be non-false (true or null) for records inserted under the same locale? That's not very useful. It would seem that this is one of the important

Re: [HACKERS] Where can I find the doxyfile?

2008-06-02 Thread Stefan Kaltenbrunner
Zdenek Kotala wrote: Xin Wang napsal(a): Hi, I don't know where I can find the doxyfile which generate doxygen.postgresql.org web site. I found that when reading code the doxygen source code is quite helpful. However, I want to generate an off-line copy of doxygen docs myself, but I can't

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread Tino Wildenhain
Andrew Sullivan wrote: ... I think if you want some special treatment of text for some users, it should be explicit. Yes. Also, not just text. Think of currency, numeric separators, c. Which imho, should not really be the business of the type interface but instead something to_char() and

Re: [HACKERS] Proposal: new function array_init

2008-06-02 Thread Pavel Stehule
2008/6/2 Tom Lane [EMAIL PROTECTED]: Pavel Stehule [EMAIL PROTECTED] writes: There was more time questions about array's initialisation. I propose function array_init. CREATE OR REPLACE FUNCTION array_init(sizes int[], v anyelement) RETURNS anyarray; I think this is basically a good idea,

Re: [HACKERS] Proposal: new function array_init

2008-06-02 Thread James William Pye
On Mon, Jun 02, 2008 at 08:10:19PM +0200, Pavel Stehule wrote: * I have a mild preference for array_fill instead of array_init. maybe, maybe array_set. Any ideas are welcome array_create? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread Shane Ambler
To diverge a little - Bit of a nood question along these lines - Does LIKE and ILIKE take into consideration the locale allowing insensitive searches in any locale setting? I know that LIKE can use an index if you don't start the match with a wild card. ILIKE doesn't seem to. Is or would

Re: [HACKERS] Core team statement on replication in PostgreSQL

2008-06-02 Thread Andreas 'ads' Scherbaum
On Mon, 02 Jun 2008 11:52:05 -0400 Chris Browne wrote: [EMAIL PROTECTED] (Andreas 'ads' Scherbaum) writes: On Thu, 29 May 2008 23:02:56 -0400 Andrew Dunstan wrote: Well, yes, but you do know about archive_timeout, right? No need to wait 2 hours. Then you ship 16 MB binary stuff

[HACKERS] rfc: add pg_dump options to dump output

2008-06-02 Thread Robert Treat
I would like to add the flags given to pg_dump into the output of the pg_dump file. For text dumps, the output would go on a line below the current header, so output would look like: -- -- PostgreSQL database dump complete -- -- Generated by: pg_dump -s -U rob pagila -- For compressed dumps,

Re: [HACKERS] rfc: add pg_dump options to dump output

2008-06-02 Thread Josh Berkus
Robert, Anyone see any issues with this? Should there be other information taken into account? Does this need to be an option itself, or can we just do it in all cases? +1 to do it in all cases. -- --Josh Josh Berkus PostgreSQL @ Sun San Francisco -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Case-Insensitve Text Comparison

2008-06-02 Thread Martijn van Oosterhout
On Mon, Jun 02, 2008 at 11:08:55AM -0700, Jeff Davis wrote: http://wiki.postgresql.org/wiki/Todo:Collate The last reference I see on that page is from 2005. Is there any updated information? Are there any major obstacles holding this up aside from the platform issues mentioned on that page?

Re: [HACKERS] phrase search

2008-06-02 Thread Sushant Sinha
On Mon, 2008-06-02 at 19:39 +0400, Teodor Sigaev wrote: I have attached a patch for phrase search with respect to the cvs head. Basically it takes a a phrase (text) and a TSVector. It checks if the relative positions of lexeme in the phrase are same as in their positions in TSVector.

Re: [HACKERS] [GENERAL] Fragments in tsearch2 headline

2008-06-02 Thread Sushant Sinha
Efficiency: I realized that we do not need to store all norms. We need to only store store norms that are in the query. So I moved the addition of norms from addHLParsedLex to hlfinditem. This should add very little memory overhead to existing headline generation. If this is still not acceptable

Re: [HACKERS] rfc: add pg_dump options to dump output

2008-06-02 Thread Tom Lane
Robert Treat [EMAIL PROTECTED] writes: I would like to add the flags given to pg_dump into the output of the pg_dump file. Why? What is the value of this added complication? Anyone see any issues with this? I'm a bit worried about breaking diff-equality of matching dumps, but mainly I don't