[HACKERS] Support for JDBC setQueryTimeout, et al.

2010-10-10 Thread David Fetter
Folks, Please find enclosed a WIP patch from one of my co-workers intended to support JDBC's setQueryTimeout, along with the patch for JDBC that uses it. I think this is an especially handy capability, and goes to the number one TODO on the JDBC compliance list. http://jdbc.postgresql.org/todo.h

Re: [HACKERS] patch: psql variables tabcomplete

2010-10-10 Thread Pavel Stehule
2010/10/11 Tom Lane : > Pavel Stehule writes: >> 2010/10/4 Itagaki Takahiro : >>> We don't have commands for display a list of such variables and \echo is >>> not tab-completed even with the patch. "Only supported by \set" might be >>> a bit unbalanced. > >> it's good idea. I looked on it - and it

Re: [HACKERS] Which file does the SELECT?

2010-10-10 Thread David Christensen
On Oct 10, 2010, at 12:21 PM, Vaibhav Kaushal wrote: > Thanks to both hitoshi and tom for your replies. > > I think I need to look into the Postgres code itself (I am better at code > than documentation). But since I have not been touch with C lately (these > days I am programming on PHP) I t

Re: [HACKERS] $libdir under linux

2010-10-10 Thread Tom Lane
Marios Vodas writes: > I want to create this function: > CREATE OR REPLACE FUNCTION myfunction(cstring) > RETURNS cstring AS > '$libdir/mylib','myfunction' > LANGUAGE 'C' IMMUTABLE STRICT; > In windows this is working fine and $libdir is substituted by the actual > path. In linux it is not su

Re: [HACKERS] patch: psql variables tabcomplete

2010-10-10 Thread Tom Lane
Pavel Stehule writes: > 2010/10/4 Itagaki Takahiro : >> We don't have commands for display a list of such variables and \echo is >> not tab-completed even with the patch. "Only supported by \set" might be >> a bit unbalanced. > it's good idea. I looked on it - and it is job for other patch. Some

[HACKERS] $libdir under linux

2010-10-10 Thread Marios Vodas
I want to create this function: CREATE OR REPLACE FUNCTION myfunction(cstring) RETURNS cstring AS '$libdir/mylib','myfunction' LANGUAGE 'C' IMMUTABLE STRICT; In windows this is working fine and $libdir is substituted by the actual path. In linux it is not substituted! This is the error I get:

Re: [HACKERS] Debugging initdb breakage

2010-10-10 Thread Tom Lane
Dimitri Fontaine writes: > How to have gdb help me? What's my error, that I guess is obvious? Might have something to do with using the same OID for the catalog and its index ... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] .gitignore files, take two

2010-10-10 Thread Robert Haas
On Oct 10, 2010, at 12:57 AM, Gurjeet Singh wrote: > On Tue, Sep 21, 2010 at 12:55 AM, Robert Haas wrote: > All the build products in a normal build. One of the infelicities of > git is that 'git status' shows the untracked files at the bottom. So > if you have lots of unignored stuff floating

Re: [HACKERS] Debugging initdb breakage

2010-10-10 Thread Heikki Linnakangas
On 10.10.2010 23:38, Dimitri Fontaine wrote: So I'm beginning to work on the extension support for dump and restore, and that begins with a new pg_extension catalog. I managed to break initdb already, of course, but I'm fighting my way out — no luck with gdb, it won't catch the Assert failure and

Re: [HACKERS] wip: functions median and percentile

2010-10-10 Thread Tom Lane
Dean Rasheed writes: > In the meantime, the attached variation of the patch fixes the temp > file issue and will support all 3 cases. It gives OK performance for > (1) and (2), and poor performance for (3). That could be viewed as a > future development task, which perhaps the window function API

Re: [HACKERS] Which file does the SELECT?

2010-10-10 Thread Martijn van Oosterhout
On Sun, Oct 10, 2010 at 10:51:54PM +0530, Vaibhav Kaushal wrote: > However, I find too many references to the Data structure "datum" what is it > and where is it defined? Can someone tell me please? Also, what role does it > play? "Datum" is the singular form of "data". It refers to a single item

Re: [HACKERS] WIP: Triggers on VIEWs

2010-10-10 Thread Tom Lane
Bernd Helmle writes: > --On 8. September 2010 09:00:33 +0100 Dean Rasheed > wrote: >> Here's an updated version with improved formatting and a few minor >> wording changes to the triggers chapter. > This version doesn't apply clean anymore due to some rejects in > plainmain.c. Corrected versio

Re: [HACKERS] Which file does the SELECT?

2010-10-10 Thread Vaibhav Kaushal
Thanks to both hitoshi and tom for your replies. I think I need to look into the Postgres code itself (I am better at code than documentation). But since I have not been touch with C lately (these days I am programming on PHP) I think I have forgot a few rules of game (afterall PHP is so much more

Re: [HACKERS] Which file does the SELECT?

2010-10-10 Thread Tom Lane
Vaibhav Kaushal writes: > Can someone tell me what are 'Join Pairs with no Join clause' ? I am not > able to figure that out! Consider select * from t1, t2, t3 where t1.a = t2.x and t1.b = t3.y; In theory this query could be done by first joining t2 and t3, then joining that to t1. But

Re: [HACKERS] Which file does the SELECT?

2010-10-10 Thread Vaibhav Kaushal
The PostgreSQL documentation (9.0.1) has the following section in section 44.5.1: The planner preferentially considers joins between any two relations for which there exist a corresponding join clause in the WHERE qualification (i.e., for which a restriction like where rel1.attr1=rel2.attr2 exists

Re: [HACKERS] levenshtein_less_equal (was: multibyte charater set in levenshtein function)

2010-10-10 Thread Alexander Korotkov
Sorry, I'm pretty *unconversant in git. Now, it should be ok.* With best regards, Alexander Korotkov. *** a/contrib/fuzzystrmatch/fuzzystrmatch.c --- b/contrib/fuzzystrmatch/fuzzystrmatch.c *** *** 61,66 PG_MODULE_MAGIC; --- 61,68 */ extern Datum levenshtein_with_co

Re: [HACKERS] Which file does the SELECT?

2010-10-10 Thread Tom Lane
Vaibhav Kaushal writes: > So if I am not wrong, I will have to understand the whole querying process > in detail? If it is so, then where do I start from? If you haven't seen it already, this is a good place to start: http://developer.postgresql.org/pgdocs/postgres/overview.html There's also som

Re: [HACKERS] Which file does the SELECT?

2010-10-10 Thread Hitoshi Harada
2010/10/10 Vaibhav Kaushal : > Thanks for the reply. > So if I am not wrong, I will have to understand the whole querying process > in detail? If it is so, then where do I start from? > -Vaibhav > > On Sun, Oct 10, 2010 at 1:41 PM, Peter Eisentraut wrote: >> >> On sön, 2010-10-10 at 13:32 +0530, V

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2010-10-10 Thread Marko Tiikkaja
On 2010-10-07 5:21 AM +0300, Steve Singer wrote: Since no one else has proposed a better idea and the commit fest is ticking away I think you should go ahead and do that. Here's a new version of the patch, deprecating pg_parse_and_rewrite. I duplicated the parse/rewrite logic in the two places

Re: [HACKERS] Which file does the SELECT?

2010-10-10 Thread Vaibhav Kaushal
Thanks for the reply. So if I am not wrong, I will have to understand the whole querying process in detail? If it is so, then where do I start from? -Vaibhav On Sun, Oct 10, 2010 at 1:41 PM, Peter Eisentraut wrote: > On sön, 2010-10-10 at 13:32 +0530, Vaibhav Kaushal wrote: > > I have gone thr

Re: [HACKERS] Which file does the SELECT?

2010-10-10 Thread Peter Eisentraut
On sön, 2010-10-10 at 13:32 +0530, Vaibhav Kaushal wrote: > I have gone through the source code a bit but I wanted to know that > which file contains the code that performs the final SLECTION after > the optimizer has created the final plan? I mean which part of the > executor is responsible for th

[HACKERS] Which file does the SELECT?

2010-10-10 Thread Vaibhav Kaushal
I have gone through the source code a bit but I wanted to know that which file contains the code that performs the final SLECTION after the optimizer has created the final plan? I mean which part of the executor is responsible for the SELCT to be run? Can someone tell me the file which governs it?