Re: [HACKERS] avoid recasting text to tsvector when calculating selectivity

2008-07-16 Thread Jan Urbański
Jan Urbański wrote: Tom Lane wrote: =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= <[EMAIL PROTECTED]> writes: I'm about to write a oprrest function for the @@ operator. Currently @@ handles multiple cases, like tsvector @@ tsquery, text @@ tsquery, tsquery @@ tsvector etc. The text @@ text case is for inst

Re: [HACKERS] avoid recasting text to tsvector when calculating selectivity

2008-07-16 Thread Jan Urbański
Tom Lane wrote: =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= <[EMAIL PROTECTED]> writes: I'm about to write a oprrest function for the @@ operator. Currently @@ handles multiple cases, like tsvector @@ tsquery, text @@ tsquery, tsquery @@ tsvector etc. The text @@ text case is for instance handled by call

Re: [HACKERS] Postgres-R source code release

2008-07-16 Thread David Fetter
On Wed, Jul 16, 2008 at 09:35:28PM +0200, Markus Schiltknecht wrote: > Hi, > > David Fetter wrote: >> Would you mind if I were to make a git branch for it on >> ? > > I've set up a git-daemon with the Postgres-R patch here: > > git://postgres-r.org/repo > > Since it's a

Re: [HACKERS] [COMMITTERS] pgsql: Allow TRUNCATE foo, foo to succeed, per report from Nikhils.

2008-07-16 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > On Wed, 2008-07-16 at 17:59 -0400, Neil Conway wrote: >> On Wed, 2008-07-16 at 21:39 +0100, Simon Riggs wrote: >>> So why do we need >>> TRUNCATE foo, foo; >> >> For the sake of completeness? Having "TRUNCATE foo, foo" fail would be >> rather inconsistent

Re: [HACKERS] avoid recasting text to tsvector when calculating selectivity

2008-07-16 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= <[EMAIL PROTECTED]> writes: > I'm about to write a oprrest function for the @@ operator. Currently @@ > handles multiple cases, like tsvector @@ tsquery, text @@ tsquery, > tsquery @@ tsvector etc. The text @@ text case is for instance handled > by calling to_tsv

[HACKERS] small bug in hlCover

2008-07-16 Thread Sushant Sinha
I think there is a slight bug in hlCover function in wparser_def.c If there is only one query item and that is the first word in the text, then hlCover does not returns any cover. This is evident in this example when ts_headline only generates the min_words: testdb=# select ts_headline('1 2 3 4 5

Re: [HACKERS] Change lock requirements for adding a trigger

2008-07-16 Thread Bruce Momjian
Added to TODO: * Reduce locking requirements for creating a trigger http://archives.postgresql.org/pgsql-hackers/2008-06/msg00635.php --- Simon Riggs wrote: > > On Wed, 2008-06-04 at 16:33 -0400, Tom Lane wrote: > > Si

Re: [HACKERS] .psqlrc output for \pset commands

2008-07-16 Thread Bruce Momjian
Gregory Stark wrote: > "Bruce Momjian" <[EMAIL PROTECTED]> writes: > > > In my .psqlrc I have: > > > > \pset format wrapped > > > > and this outputs this on psql startup: > > > > $ psql test > > --> Output format is wrapped. > > psql (8.4devel) > > Type "help" for help. > > > > Is

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

2008-07-16 Thread Oleg Bartunov
On Wed, 16 Jul 2008, Sushant Sinha wrote: I will add test queries and their results for the corner cases in a separate file. I guess the only thing I am confused about is what should be the behavior of headline generation when Query items have words of size less than ShortWord. I guess the answe

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

2008-07-16 Thread Sushant Sinha
I will add test queries and their results for the corner cases in a separate file. I guess the only thing I am confused about is what should be the behavior of headline generation when Query items have words of size less than ShortWord. I guess the answer is to ignore ShortWord parameter but let me

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

2008-07-16 Thread Oleg Bartunov
Sushant, first, please, provide simple test queries, which demonstrate the right work in the corner cases. This will helps reviewers to test your patch and helps you to make sure your new version is ok. For example: =# select ts_headline('1 2 3 4 5 1 2 3 1','1&3'::tsquery);

[HACKERS] avoid recasting text to tsvector when calculating selectivity

2008-07-16 Thread Jan Urbański
I'm about to write a oprrest function for the @@ operator. Currently @@ handles multiple cases, like tsvector @@ tsquery, text @@ tsquery, tsquery @@ tsvector etc. The text @@ text case is for instance handled by calling to_tsvector and plainto_tsquery on the input arguments. For a @@ restrict

Re: [HACKERS] Postgres-R: current state of development

2008-07-16 Thread Dimitri Fontaine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, First, thanks a lot for opening Postgres-R, I hope -core will find in your code as many good ideas and code as possible :) Le 15 juil. 08 à 18:48, Markus Wanner a écrit : A pretty general framework for helper processes is provided. I think

[HACKERS] Postgres-R: primary key patches

2008-07-16 Thread Markus Wanner
Hi, as you might know, Postgres-R relies on primary keys to address tuples of a table. It cannot replicate tables without a primary key. Primary keys currently aren't really used within the executor, so I had to extended and modify Postgres here and there, to get the required information. To

Re: [HACKERS] Postgres-R source code release

2008-07-16 Thread Markus Wanner
Hi, David Fetter wrote: Would you mind if I were to make a git branch for it on ? I've set up a git-daemon with the Postgres-R patch here: git://postgres-r.org/repo Since it's a distributed VCS, you should be able to mirror that to git.postgtresql.org somehow (i

Re: [HACKERS] PATCH: CITEXT 2.0 v4

2008-07-16 Thread David E. Wheeler
On Jul 16, 2008, at 11:20, Robert Treat wrote: I was thinking about this a bit last night and wanted to fill things out a bit. As a programmer, I find Donald Fraser's hindsight to be more appealing, because at least that way I have the option to do matching against CITEXT strings case-sensitive

Re: [HACKERS] PATCH: CITEXT 2.0 v4

2008-07-16 Thread Robert Treat
On Wednesday 16 July 2008 13:54:25 David E. Wheeler wrote: > On Jul 15, 2008, at 22:23, David E. Wheeler wrote: > > * The README for citext 1.0 on pgFoundry says: > >> I had to make a decision on casting between types for regular > >> expressions and > >> decided that if any parameter is of citext

Re: [HACKERS] PATCH: CITEXT 2.0 v4

2008-07-16 Thread David E. Wheeler
On Jul 15, 2008, at 22:23, David E. Wheeler wrote: * The README for citext 1.0 on pgFoundry says: I had to make a decision on casting between types for regular expressions and decided that if any parameter is of citext type then case insensitive applies. For example applying regular express

Re: [HACKERS] ExecuteTruncate quirk: expects a unique list of relations

2008-07-16 Thread Bruce Momjian
Nikhils wrote: > Hi, > > Consider this simple case: > > postgres=# TRUNCATE foo, foo; > ERROR: cannot TRUNCATE "foo" because it is being used by active queries in > this session > > The above occurs because the ExecuteTruncate() function invokes > truncate_check_rel() in a loop. Since the same

Re: [HACKERS] Overhauling GUCS

2008-07-16 Thread Bruce Momjian
Added to TODO: o Add external tool to auto-tune some postgresql.conf parameters http://archives.postgresql.org/pgsql-hackers/2008-06/msg0.php --- Tom Lane wrote: > Andrew Dunstan <[EMAIL PROTECTED]> w

[HACKERS] autovacuum crash due to null pointer

2008-07-16 Thread Tom Lane
There's a fairly interesting crash here: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=jaguar&dt=2008-07-16%2003:00:02 The buildfarm was nice enough to provide a stack trace at the bottom of the page, which shows clearly that autovac tried to pfree a null pointer. What I think happened was tha

[HACKERS] temp table problem

2008-07-16 Thread Abbas
Hi, I have come across a problem. When you try to access a temp table created via SPI_EXEC, you get a table not found error. SPI_EXEC("CREATE TEMP TABLE my_temp_table(first_name text, last_name text)", UTILITY); SPI_EXEC("REVOKE ALL ON TABLE my_temp_table FROM PUBLIC", UTILITY); The second st

Re: [HACKERS] [PATCHES] pg_dump lock timeout

2008-07-16 Thread daveg
On Thu, Jul 03, 2008 at 05:55:01AM -0700, daveg wrote: > On Thu, Jul 03, 2008 at 11:15:10AM +0300, Marko Kreen wrote: > > On 5/11/08, daveg <[EMAIL PROTECTED]> wrote: > > > Attached is a patch to add a commandline option to pg_dump to limit how > > > long > > > pg_dump will wait for locks during

Re: [HACKERS] gsoc, store hash index tuple with hash code only

2008-07-16 Thread Xiao Meng
A problem here is that _create_hash_desc is called many times to create a TupleDesc with int32 attribute. I've tried to implement the function like this , TupleDesc _create_hash_desc() { static bool firstcall = true; static TupleDesc tupdesc; if(firstcall){ tupdesc = CreateTempl

Re: [HACKERS] gsoc, store hash index tuple with hash code only

2008-07-16 Thread Xiao Meng
I've fixed the patch just now. It works and pass the regression test ;-) Here is the new patch. I'll keep the hash code in order and use binary search in a later version soon. diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c index 6a5c000..1a8dc75 100644 --- a/src/bac

[HACKERS] postmaster.pid not visible

2008-07-16 Thread cinu
Hi All, I installed PostgreSQL-8.3.1 on my Suse Linux machine, it went on fine without any problems and I was able to create and access the database, even I was able to start, restart and check the status of the service. Since it is my local machine and people are remotly connecting to the data