Re: [HACKERS] How to implement Gin method?

2013-07-07 Thread kenji uno
Hi. Ok, ok thanks. My problem is to shorten time of searching full text stored in text field. The table definition is like following: CREATE TABLE xxx ( ... title character varying, ... fts1body text, ... ) If user requests keywords, we use a kind of "stristr" that is targeting Ja

Re: [HACKERS] in-catalog Extension Scripts and Control parameters (templates?)

2013-07-07 Thread Jaime Casanova
On Sat, Jul 6, 2013 at 2:25 PM, Dimitri Fontaine wrote: > Jaime Casanova writes: >> not sure if you're wrong. but at the very least, you miss a >> heap_freetuple(oldtup) there, because get_catalog_object_by_oid() > > Well, oldtup can be either a syscache copy or a heap tuple. I've been > looking

Re: [HACKERS] WAL

2013-07-07 Thread Hari Babu
On Saturday, July 06, 2013 10:00 AM mohsen soodkhah mohammadi wrote: >hello. >I am reading about WAL and XLOG records. >I am beginner in them. >can you direct me and give me some document? Please go through the README file which is present in the following folder for more details. Src/b

Re: [HACKERS] postgresMain() function

2013-07-07 Thread Amit Kapila
On Sunday, July 07, 2013 3:46 PM mohsen soodkhah mohammadi wrote: > hello . > In Postgres.c we have a switch for firstchar .  one of case of them is : case 'Q' that is for simple queries. > I want to know the other cases were for what operations . > and: > is the case with  'Q' parameter for DDL a

Re: FILTER for aggregates [was Re: [HACKERS] Department of Redundancy Department: makeNode(FuncCall) division]

2013-07-07 Thread David Fetter
On Sat, Jul 06, 2013 at 11:49:21AM +0100, Dean Rasheed wrote: > On 5 July 2013 18:23, David Fetter wrote: > > Please find attached changes based on the above. > > > > This looks good. The grammar changes are smaller and neater now on top > of the makeFuncCall() patch. > > Overall I think this pa

Re: [HACKERS] Re: [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc

2013-07-07 Thread Noah Misch
On Sun, Jul 07, 2013 at 08:55:01PM -0400, Peter Eisentraut wrote: > On Sun, 2013-07-07 at 20:15 -0400, Noah Misch wrote: > > I mildly recommend we reject this patch as such, remove the TODO item, > > remove > > the XXX comments this patch removes, and plan not to add more trivial > > SPI > > wrappe

Re: [HACKERS] [PATCH] Add session_preload_libraries configuration parameter

2013-07-07 Thread Peter Eisentraut
On Sun, 2013-07-07 at 22:50 +0200, Dimitri Fontaine wrote: > Would it make sense to review the local_preload_libraries semantics > instead? It looks like session_preload_libraries only adds > flexibility, > and that current usages of local_preload_libraries would be served as > well by the new sett

Re: [HACKERS] Re: [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc

2013-07-07 Thread Peter Eisentraut
On Sun, 2013-07-07 at 20:15 -0400, Noah Misch wrote: > I mildly recommend we reject this patch as such, remove the TODO item, > remove > the XXX comments this patch removes, and plan not to add more trivial > SPI > wrappers. If consensus goes otherwise, I think we should at least > introduce > SPI

[HACKERS] WAL

2013-07-07 Thread mohsen soodkhah mohammadi
hello. I am reading about WAL and XLOG records. I am beginner in them. can you direct me and give me some document?

[HACKERS] Re: [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc

2013-07-07 Thread Noah Misch
I find the SPI "interface support functions" quaint. They're thin wrappers, of ancient origin, around standard backend coding patterns. They have the anti-feature of communicating certain programming errors through return value/SPI_result rather than elog()/Assert(). The chance that we could sub

Re: [HACKERS] [COMMITTERS] pgsql: PL/Python: Convert numeric to Decimal

2013-07-07 Thread Claudio Freire
On Sun, Jul 7, 2013 at 4:28 PM, Peter Eisentraut wrote: > On Sun, 2013-07-07 at 02:01 -0300, Claudio Freire wrote: >> You really want to test more than just the str. The patch contains >> casts to int and float, which is something existing PLPython code will >> be doing, so it's good to test it st

Re: [HACKERS] Review: extension template

2013-07-07 Thread Markus Wanner
Hello Dimitri, On 07/07/2013 09:51 PM, Dimitri Fontaine wrote: > Markus Wanner writes: >> Oh, I just realize that pg_extension_{template,control,uptmpl} are not >> SHARED catalogs, but you need to install the template per-database and >> then need to enable it - per-database *again*. Why is that?

Re: [HACKERS] [PATCH] Add session_preload_libraries configuration parameter

2013-07-07 Thread Dimitri Fontaine
Peter Eisentraut writes: > This is like shared_preload_libraries except that it takes effect at > backend start and can be changed without a full postmaster restart. It > is like local_preload_libraries except that it is still only settable by > a superuser. This can be a better way to load modu

Re: [HACKERS] changeset generation v5-01 - Patches & git tree

2013-07-07 Thread Andres Freund
On 2013-07-07 15:43:17 -0400, Tom Lane wrote: > Andres Freund writes: > > 3b) Add catcache 'filter' that ensures the cache stays unique and use > > that for the mapping > > > I slightly prefer 3b) because it's smaller, what's your opinions? > > This is just another variation on the theme of

Re: [HACKERS] [COMMITTERS] pgsql: PL/Python: Convert numeric to Decimal

2013-07-07 Thread Szymon Guz
On 7 July 2013 21:35, Peter Eisentraut wrote: > On Sun, 2013-07-07 at 17:21 +0200, Szymon Guz wrote: > > I think that these tests are much better, so they should go into > > trunk. > > As for Python 2.5 I think we could modify the code and makefile (with > > additional documentation info) so the

Re: [HACKERS] Review: extension template

2013-07-07 Thread Dimitri Fontaine
Markus Wanner writes: > Oh, I just realize that pg_extension_{template,control,uptmpl} are not > SHARED catalogs, but you need to install the template per-database and > then need to enable it - per-database *again*. Why is that? Because the current model is not serving us well enough, with a sin

Re: [HACKERS] Add regression tests for DISCARD

2013-07-07 Thread Robins Tharakan
On 7 July 2013 14:08, Jeff Janes wrote: > Why does serial_schedule even exist? Couldn't we just run the > parallel schedule serially, like what happens when MAX_CONNECTIONS=1? > Well, I am sure it works that way, without errors. The 'why' still eludes me though, just that its required for this

Re: [HACKERS] changeset generation v5-01 - Patches & git tree

2013-07-07 Thread Tom Lane
Andres Freund writes: > 3b) Add catcache 'filter' that ensures the cache stays unique and use > that for the mapping > I slightly prefer 3b) because it's smaller, what's your opinions? This is just another variation on the theme of kluging the catcache to do something it shouldn't. You're s

Re: [HACKERS] [PATCH] Add session_preload_libraries configuration parameter

2013-07-07 Thread Peter Eisentraut
On Fri, 2013-06-21 at 11:51 +0200, Dimitri Fontaine wrote: > I found it strange that those two paras read differently for saying > the > same thing? > > > +preloaded at connection start. This parameter cannot be > changed after > > +the start of a particular session. If a specifi

Re: [HACKERS] [COMMITTERS] pgsql: PL/Python: Convert numeric to Decimal

2013-07-07 Thread Peter Eisentraut
On Sun, 2013-07-07 at 17:21 +0200, Szymon Guz wrote: > I think that these tests are much better, so they should go into > trunk. > As for Python 2.5 I think we could modify the code and makefile (with > additional documentation info) so the decimal code wouldn't be > compiled > with python 2.5. I

Re: [HACKERS] [COMMITTERS] pgsql: PL/Python: Convert numeric to Decimal

2013-07-07 Thread Peter Eisentraut
On Sun, 2013-07-07 at 02:01 -0300, Claudio Freire wrote: > You really want to test more than just the str. The patch contains > casts to int and float, which is something existing PLPython code will > be doing, so it's good to test it still can be done with decimal. Let's remember that we are regr

Re: [HACKERS] [PATCH] Add transforms feature

2013-07-07 Thread Peter Eisentraut
On Fri, 2013-07-05 at 12:04 -0700, Josh Berkus wrote: > (a) transforms aren't like other contribs, in that they are dependant on > other contribs before you install them. That doesn't appear to be a reason for creating subdirectories. > (b) we can expect maybe a dozen to 18 of them in core based

Re: [HACKERS] Add regression tests for DISCARD

2013-07-07 Thread Jeff Janes
On Sat, Jul 6, 2013 at 8:49 PM, Robins Tharakan wrote: > Thanks Fabrizio. > > Although parallel_schedule was a miss for this specific patch, however, I > guess I seem to have missed out serial_schedule completely (in all patches) > and then thanks for pointing this out. Subsequently Robert too not

Re: [HACKERS] [PATCH] Add transforms feature

2013-07-07 Thread Peter Eisentraut
On Thu, 2013-07-04 at 02:18 -0700, Hitoshi Harada wrote: > as someone suggested in the previous thread, it might be a variant of > CAST. CREATE CAST (hstore AS plpython2u) ? Or CREATE LANGUAGE TRANSFORM > might sound better. In either case, I think we are missing the discussion > on the standard

Re: [HACKERS] Review: extension template

2013-07-07 Thread Markus Wanner
On 07/07/2013 02:55 PM, Markus Wanner wrote: > If you want to just upload extensions to a database via libpq.. Let's rephrase this in a (hopefully) more constructive way: I get the impression you are trying to satisfy many different needs. Way more that you need to scratch your own itch. To the po

Re: [HACKERS] changeset generation v5-01 - Patches & git tree

2013-07-07 Thread Andres Freund
On 2013-06-28 21:47:47 +0200, Andres Freund wrote: > So, from what I gather there's a slight leaning towards *not* storing > the relation's oid in the WAL. Which means the concerns about the > uniqueness issues with the syscaches need to be addressed. So far I know > of three solutions: > 1) develo

Re: [HACKERS] strange IS NULL behaviour

2013-07-07 Thread Bruce Momjian
On Sun, Jul 7, 2013 at 01:04:05PM -0400, Bruce Momjian wrote: > Looks like I have to modify ExecEvalNullTest(). Oops, I mean ExecConstraints(). This could be tricky. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impos

Re: [HACKERS] Add regression tests for SET xxx

2013-07-07 Thread Robins Tharakan
On 18 June 2013 05:01, Szymon Guz wrote: > I've checked the patch. Applies cleanly. Tests pass this time :) Updated the patch: - Updated ROLE names as per Robert's feedback (regress_xxx) - Added test to serial_schedule -- Robins Tharakan regress_variable_v5.patch Description: Binary data --

Re: [HACKERS] strange IS NULL behaviour

2013-07-07 Thread Bruce Momjian
On Fri, Jul 5, 2013 at 11:03:56AM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Thu, Jul 4, 2013 at 04:29:20PM -0400, Tom Lane wrote: > >> No, it isn't, or at least it's far from the only place. If we're going > >> to change this, we would also want to change the behavior of tests on >

Re: [HACKERS] Add tests for LOCK TABLE

2013-07-07 Thread Robins Tharakan
On 23 May 2013 18:19, Robins Tharakan wrote: > Please find attached a patch to take code-coverage of LOCK TABLE ( > src/backend/commands/lockcmds.c) from 57% to 84%. Updated the patch: - Updated ROLEs as per Robert's feedback - Added test to serial_schedule. -- Robins Tharakan regress_lock_v

Re: [HACKERS] planner not choosing fastest estimated plan

2013-07-07 Thread Tom Lane
Jeff Janes writes: > I have a weird case where the planner doesn't choose the plan that it > itself believes to be the fastest plan. I poked into this a bit and found where things are going wrong. The ideal plan for this case involves a nestloop with a parameterized inner scan over an inheritanc

Re: [HACKERS] Add regression tests for ROLE (USER)

2013-07-07 Thread Andres Freund
On 2013-07-07 11:11:49 -0400, Tom Lane wrote: > Fabien COELHO writes: > >> Generally, I think that the tests which return a syntax error are of > >> limited value and should probably be dropped. > > > I think that it is not that simple: it is a good value to check that the > > syntax error mess

Re: [HACKERS] Add regression tests for ROLE (USER)

2013-07-07 Thread Tom Lane
Fabien COELHO writes: >> Generally, I think that the tests which return a syntax error are of >> limited value and should probably be dropped. > I think that it is not that simple: it is a good value to check that the > syntax error message conveys a useful information for the user, and that >

Re: [HACKERS] Add more regression tests for dbcommands

2013-07-07 Thread Robins Tharakan
On 26 June 2013 01:55, Robins Tharakan wrote: > > Code coverage improved from 36% to 68%. > Updated patch: - Renamed ROLEs as per Robert's feedback (prepend regress_xxx) - Added test to serial_schedule (missed out earlier). -- Robins Tharakan regress_db_v5.patch Description: Binary data --

Re: [HACKERS] vacuumlo - use a cursor

2013-07-07 Thread Josh Kupershmidt
On Mon, Nov 12, 2012 at 5:14 PM, Andrew Dunstan wrote: > vacuumlo is rather simpleminded about dealing with the list of LOs to be > removed - it just fetches them as a straight resultset. For one of my our > this resulted in an out of memory condition. Wow, they must have had a ton of LOs. With a

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2013-07-07 Thread Simon Riggs
On 3 January 2012 18:42, Tom Lane wrote: > I wrote: >>> Another point that requires some thought is that switching SnapshotNow >>> to be MVCC-based will presumably result in a noticeable increase in each >>> backend's rate of wanting to acquire snapshots. > > BTW, I wonder if this couldn't be amel

Re: [HACKERS] WAL and XLOG

2013-07-07 Thread Amit Langote
On Sun, Jul 7, 2013 at 3:48 PM, mohsen soodkhah mohammadi wrote: > hello. > I am reading about WAL and XLOG records. > I am beginner in them. > can you direct me and give me some document? > I want to know what did save in XLOG records exactly and who can create XLOG > records? > You could start

Re: [HACKERS] Add some regression tests for SEQUENCE

2013-07-07 Thread Robins Tharakan
On 3 July 2013 10:13, Robert Haas wrote: > I think you should rename the roles used here to regress_rol_seq1 etc. > to match the CREATE OPERATOR patch. > Please find updated patch: - 'make check' successful with recent changes - Renamed ROLEs as per feedback -- Robins Tharakan regress_sequenc

Re: [HACKERS] Review: extension template

2013-07-07 Thread Markus Wanner
On 07/06/2013 10:30 PM, Dimitri Fontaine wrote: > I still think that we shouldn't allow creating a template for an > extension that is already installed, though. Do you have any suggestions > for a better error message? Oh, I just realize that pg_extension_{template,control,uptmpl} are not SHARED

Re: [HACKERS] Review: extension template

2013-07-07 Thread Markus Wanner
Salut Dimitri, On 07/06/2013 10:30 PM, Dimitri Fontaine wrote: > Yes, I did share this viewpoint over the naming of the feature, but Tom > insisted that we already have those kind of templates for text search. I think it's a question of what mental model we want extensions to follow. See my other

Re: [HACKERS] Patch to add regression tests for SCHEMA

2013-07-07 Thread Robins Tharakan
On 3 July 2013 10:19, Robert Haas wrote: > In this particular case, I think that adding a new set of tests isn't > the right thing anyway. Schemas are also known as namespaces, and the > existing "namespace" test is where related test cases live. Add these > tests there instead. > > Rename regr

Re: [HACKERS] copy & pasted include guard in attoptcache.h

2013-07-07 Thread Magnus Hagander
On Sat, Jul 6, 2013 at 12:12 PM, Andres Freund wrote: > Hi, > > attoptcache.h currently uses #ifndef SPCCACHE_H. The attached patch > fixes that. > A quick > $ grep -r '\#ifndef' src/include/|grep _H|awk '{print $2}'|sort|uniq -cd > doesn't show any further duplicated ones. Applied, thanks! --

[HACKERS] WAL and XLOG

2013-07-07 Thread mohsen soodkhah mohammadi
hello. I am reading about WAL and XLOG records. I am beginner in them. can you direct me and give me some document? I want to know what did save in XLOG records exactly and who can create XLOG records?

[HACKERS] postgresMain() function

2013-07-07 Thread mohsen soodkhah mohammadi
hello . In Postgres.c we have a switch for firstchar . one of case of them is : case 'Q' that is for simple queries. I want to know the other cases were for what operations . and: is the case with 'Q' parameter for DDL and DML commands?

Re: [HACKERS] How to implement Gin method?

2013-07-07 Thread Martijn van Oosterhout
On Sun, Jul 07, 2013 at 10:00:16AM +0900, Kenji uno wrote: > Hi. > > I want to try GIN and know programming information of GIN technology. > > Please teach me about these functions extractValue, extractQuery and > consistent. > > I have posted question at stack overflow. > > http://stackoverfl

Re: [HACKERS] Add regression tests for ROLE (USER)

2013-07-07 Thread Fabien COELHO
Generally, I think that the tests which return a syntax error are of limited value and should probably be dropped. I think that it is not that simple: it is a good value to check that the syntax error message conveys a useful information for the user, and that changes to the parser rules do

Re: [HACKERS] Patch for fail-back without fresh backup

2013-07-07 Thread Sawada Masahiko
On Sun, Jul 7, 2013 at 4:19 PM, Sawada Masahiko wrote: > On Mon, Jun 17, 2013 at 8:48 PM, Simon Riggs wrote: >> On 17 June 2013 09:03, Pavan Deolasee wrote: >> >>> I agree. We should probably find a better name for this. Any suggestions ? >> >> err, I already made one... >> But that's not t

Re: [HACKERS] Patch for fail-back without fresh backup

2013-07-07 Thread Sawada Masahiko
On Mon, Jun 17, 2013 at 8:48 PM, Simon Riggs wrote: > On 17 June 2013 09:03, Pavan Deolasee wrote: > >> I agree. We should probably find a better name for this. Any suggestions ? > > err, I already made one... > >>> But that's not the whole story. I can see some utility in a patch that >>> makes