Re: [HACKERS] Using results from INSERT ... RETURNING

2009-09-26 Thread Tom Lane
Robert Haas writes: > Well, part of the problem is that I've not had a lot of luck trying to > understand how the executor really works (what's a tuple table slot > and why do we need to know in advance how many of them there are?). You know, that's actually a really good question. There is not,

Re: [HACKERS] Issues for named/mixed function notation patch

2009-09-26 Thread Pavel Stehule
> "However, a named variadic argument can only be called the way shown in > the example above. The VARIADIC keyword must not be specified and a > variadic notation of all arguments is not supported. To use variadic > argument lists you must use positional notation instead." > > What is the intended

Re: [HACKERS] TODO item: Allow more complex user/database default GUC settings

2009-09-26 Thread Alvaro Herrera
Robert Haas escribió: > The problem of having both a table and a closely related view is, > IME, one that comes up a lot. I think you just need to pick a > convention and stick with it. Mine is to append "_view" to the > table name. That would make the difference clear, but since what the user n

Re: [HACKERS] libpq port number handling

2009-09-26 Thread Tom Lane
Sam Mason writes: > Hum, why is PG doing an (unchecked) atoi on the user specified port > rather than leaving it up to getaddrinfo to resolve the port? It would > seem to require changing UNIXSOCK_PATH to accept a string as the "port > number", which is probably a bit much of a change. > The inc

Re: [HACKERS] [COMMITTERS] pgsql: Unicode escapes in E'...' strings Author: Marko Kreen

2009-09-26 Thread Tom Lane
Marko Kreen writes: > Anyway, now I attached a patch, where I filled the section but without > referring it from anywhere. The rules itself are now equal. Is that OK? Well, you also have to track the state changes (BEGIN). In comparing the scanners I realized I'd forgotten to sync psql myself

Re: [HACKERS] Hot Standby on git

2009-09-26 Thread Alvaro Herrera
Mark Mielke escribió: > Most real life code gets a little more complicated. For example, > what if we want to simulate a network failure or "out of disk space" > condition? What if we want to test out what happens when the Y2038 > date is reached? This requires either complex test case setup that

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-26 Thread Andrew Dunstan
Joshua Tolley wrote: On Sat, Sep 26, 2009 at 11:43:46AM -0400, Tom Lane wrote: complete but more complex solution. (dup2 works on Windows, no?) Unless I'm misreading syslogger.c, dup2() gets called on every platform. Yes. Windows supports dup2(). See for example

Re: [HACKERS] Hot Standby on git

2009-09-26 Thread David E. Wheeler
On Sep 26, 2009, at 12:33 PM, Josh Berkus wrote: There's always pgtap. Whenever we find a new corner case, we add it to the development test suite. Also, for C TAP, there's [libtap](http://jc.ngo.org.uk/trac-bin/trac.cgi/wiki/LibTap ). You can then use `prove` which you likely already have

Re: [HACKERS] 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server

2009-09-26 Thread David Fetter
On Sat, Sep 26, 2009 at 11:02:55PM +0300, Peter Eisentraut wrote: > On Fri, 2009-09-25 at 16:59 -0400, Tom Lane wrote: > > "shakahsha...@gmail.com" writes: > > > From pg_dump/pg_restore section (9.2 of the Todo page on the > > > PostgreSQL Wiki), is the following item "Add comments to output > > >

Re: [HACKERS] Issues for named/mixed function notation patch

2009-09-26 Thread Jeff Davis
On Tue, 2009-09-15 at 10:51 +0200, Pavel Stehule wrote: > My renonc, please, try new patch. I forgot mark regproc.c file. I think the documentation around calling functions is disorganized: Variadic functions, functions with defaults, SRFs, out parameters, and polymorphism are all explained in 34

Re: [HACKERS] Join optimization for inheritance tables

2009-09-26 Thread Emmanuel Cecchet
Hi Simon, Thanks for the insight. I might take that as a long term project. I have to discuss that with my colleagues at Aster. It would certainly help to put together a wiki page with the key insights on the design of such implementation to be able to better scope the project and agree on wha

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-26 Thread Joshua Tolley
On Sat, Sep 26, 2009 at 11:43:46AM -0400, Tom Lane wrote: > complete but more complex solution. (dup2 works on Windows, no?) Unless I'm misreading syslogger.c, dup2() gets called on every platform. I've started the wiki page in question: http://wiki.postgresql.org/wiki/Logging_Brainstorm It doe

Re: [HACKERS] Hot Standby on git

2009-09-26 Thread Mark Mielke
On 09/26/2009 02:28 PM, Dan Colish wrote: There are a variety of projects dedicated to creating C unit test frameworks. I don't have a lot of experience with them, but I have heard good things about check and cunit. Here's a link I found with a longer list of frameworks. http://www.opensourcetest

Re: [HACKERS] 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server

2009-09-26 Thread Peter Eisentraut
On Fri, 2009-09-25 at 16:59 -0400, Tom Lane wrote: > "shakahsha...@gmail.com" writes: > > From pg_dump/pg_restore section (9.2 of the Todo page on the > > PostgreSQL Wiki), is the following item > > "Add comments to output indicating version of pg_dump and of the > > database server" > > simply

Re: [HACKERS] Join optimization for inheritance tables

2009-09-26 Thread Tom Lane
Herodotos Herodotou writes: > On Tue, Sep 22, 2009 at 8:06 PM, Jeff Davis wrote: >> I think you mean that the planning time is in milliseconds, not seconds. > The planning time is actually in seconds. This is exactly why I think this is a dead-end approach. Trying to do theorem proving from an

Re: [HACKERS] Hot Standby on git

2009-09-26 Thread Josh Berkus
> I feel like I need a better way of unit testing new code. Some of the > code in the patch is to handle corner cases, so recreating them is > fairly hard. It is a nagging feeling that I am missing some knowledge > here and would welcome some insight, or research, into better ways of > doing gener

Re: [HACKERS] TODO item: Allow more complex user/database default GUC settings

2009-09-26 Thread Robert Haas
On Sep 26, 2009, at 11:59 AM, Tom Lane wrote: Alvaro Herrera writes: Right, that works. Updated patch attached; should solve the issues raised in the thread. I renamed the catalog pg_db_role_setting as suggested by Tom. ... I have also added a view, whose only purpose is to convert the role

Re: [HACKERS] [COMMITTERS] pgsql: Unicode escapes in E'...' strings Author: Marko Kreen

2009-09-26 Thread Marko Kreen
Resend... On 9/26/09, Tom Lane wrote: > Marko Kreen writes: > > On 9/26/09, Peter Eisentraut wrote: > > >> That patch results in the following message from flex: > >> > >> psqlscan.l:1039: warning, -s option given but default rule can be > >> matched > > > Agh. Well, that just means the

Re: [HACKERS] syslog_line_prefix

2009-09-26 Thread Tom Lane
Robert Haas writes: > I also agree with Tom's comments that we don't have consensus on where > this should go. I think it would help a lot if someone put together a > design document (perhaps on the wiki) and tried to enumerate at a high > level the logging requirements that aren't being satisfie

Re: [HACKERS] [COMMITTERS] pgsql: Unicode escapes in E'...' strings Author: Marko Kreen

2009-09-26 Thread Tom Lane
Marko Kreen writes: > On 9/26/09, Peter Eisentraut wrote: >> That patch results in the following message from flex: >> >> psqlscan.l:1039: warning, -s option given but default rule can be >> matched > Agh. Well, that just means the state must be commented out: > -%x xeu > +/* %x xeu */ Ic

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-26 Thread Tom Lane
Robert Haas writes: > On Fri, Sep 25, 2009 at 5:22 PM, Robert Haas wrote: >> AIUI the problem is that when logging_collector is on, we throw away >> the original stderr.  That's OK as long as you never try to switch >> back to it. > BTW, this seems like it could be fixed with some appropriate fi

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-26 Thread Magnus Hagander
On Sat, Sep 26, 2009 at 17:43, Tom Lane wrote: > Robert Haas writes: >> On Fri, Sep 25, 2009 at 5:22 PM, Robert Haas wrote: >>> AIUI the problem is that when logging_collector is on, we throw away >>> the original stderr.  That's OK as long as you never try to switch >>> back to it. > >> BTW, th

Re: [HACKERS] Hot Standby on git

2009-09-26 Thread Dan Colish
On Sat, Sep 26, 2009 at 10:45:17AM -0400, Mark Mielke wrote: > On 09/26/2009 10:04 AM, Simon Riggs wrote: > >>If you think there's > >>something useful I could do, let me know and I'll take a look. > >I feel like I need a better way of unit testing new code. Some of the > >code in the patch is to h

Re: [HACKERS] Hot Standby on git

2009-09-26 Thread Mark Mielke
On 09/26/2009 10:04 AM, Simon Riggs wrote: If you think there's something useful I could do, let me know and I'll take a look. I feel like I need a better way of unit testing new code. Some of the code in the patch is to handle corner cases, so recreating them is fairly hard. It is a naggi

Re: [HACKERS] Hot Standby on git

2009-09-26 Thread Simon Riggs
On Sat, 2009-09-26 at 09:29 -0400, Robert Haas wrote: > > I estimate that making the remaining changes noted on the Wiki and > fully > > testing them will take at least 2 weeks. Gabriele Bartolini is assisting > > in this area, though neither of us are able to work full time on this. > > We still

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-26 Thread Robert Haas
On Fri, Sep 25, 2009 at 5:22 PM, Robert Haas wrote: > AIUI the problem is that when logging_collector is on, we throw away > the original stderr.  That's OK as long as you never try to switch > back to it. BTW, this seems like it could be fixed with some appropriate file descriptor management in

[HACKERS] Hot Standby on git

2009-09-26 Thread Simon Riggs
Just a note to say that Hot Standby patch is now on git repository git://git.postgresql.org/git/users/simon/postgres Branch name: hot_standby The complete contents of that repository are BSD licenced contributions to the PostgreSQL project. Any further changes to that will be by agreement here

Re: [HACKERS] TODO item: Allow more complex user/database default GUC settings

2009-09-26 Thread Tom Lane
Alvaro Herrera writes: > Right, that works. Updated patch attached; should solve the issues > raised in the thread. I renamed the catalog pg_db_role_setting as > suggested by Tom. > ... > I have also added a view, whose only purpose is to convert the role and > database OIDs into names. It's be

Re: [HACKERS] Join optimization for inheritance tables

2009-09-26 Thread Simon Riggs
On Tue, 2009-09-22 at 18:16 -0400, Emmanuel Cecchet wrote: > If the partitioning implementation does not make progress (and does not > make it for 8.5) Manu, not sure if you are referring to Kedar's patch I reviewed earlier in July, but that patch didn't implement anything like the right intern

Re: [HACKERS] syslog_line_prefix

2009-09-26 Thread Robert Haas
On Fri, Sep 25, 2009 at 6:12 PM, Andrew Dunstan wrote: > Tom Lane wrote: >> Joshua Tolley writes: >>> Having just sent two messages to the discussion about the wrong patch, >>> I'll >>> apologize, and shut up now :) >> >> No need to apologize --- this really is, and should be, all one >> conversa

Re: [HACKERS] [COMMITTERS] pgsql: Unicode escapes in E'...' strings Author: Marko Kreen

2009-09-26 Thread Peter Eisentraut
On Sat, 2009-09-26 at 00:18 +0300, Marko Kreen wrote: > On 9/26/09, Tom Lane wrote: > > Maybe it doesn't "need" to know, but I think it would be disastrous from > > a maintenance standpoint to not keep the two sets of flex rules in > > strict correspondence. It would soon become unclear whether

Re: [HACKERS] [COMMITTERS] pgsql: Unicode escapes in E'...' strings Author: Marko Kreen

2009-09-26 Thread Marko Kreen
On 9/26/09, Peter Eisentraut wrote: > On Sat, 2009-09-26 at 00:18 +0300, Marko Kreen wrote: > > On 9/26/09, Tom Lane wrote: > > > Maybe it doesn't "need" to know, but I think it would be disastrous from > > > a maintenance standpoint to not keep the two sets of flex rules in > > > strict co

Re: [HACKERS] Hot Standby on git

2009-09-26 Thread Robert Haas
On Sat, Sep 26, 2009 at 5:49 AM, Simon Riggs wrote: > > Just a note to say that Hot Standby patch is now on git repository >  git://git.postgresql.org/git/users/simon/postgres > Branch name: hot_standby Awesome! Thanks for taking the time to get this set up. > The complete contents of that repo