[HACKERS] compile error with -DOPTIMIZER_DEBUG

2009-11-22 Thread Jan Urbański
Hi, ISTM that there's a superfluous curly brace in print_path (which only gets compiled with -DOPTIMIZER_DEBUG. Patch attached. Jan diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index bfadcb0..6b2f86c 100644 ---

[HACKERS] forget patch win32.mak.

2009-11-22 Thread Hiroshi Saito
Hi Magnus. It is a thing left behind.:-) please apply it. Thanks! == libpq.lib(ip.obj) : error LNK2019: 未解決の外部シンボル __imp__wsaio...@36 が関 数 _pg_foreach_ifaddr で参照されました。 libpq.lib(ip.obj) : error LNK2019: 未解決の外部シンボル __imp__wsasock...@24 が 関数 _pg_foreach_ifaddr で参照されました。 == Regards, Hiroshi

Re: [HACKERS] compile error with -DOPTIMIZER_DEBUG

2009-11-22 Thread Heikki Linnakangas
Jan Urbański wrote: ISTM that there's a superfluous curly brace in print_path (which only gets compiled with -DOPTIMIZER_DEBUG. Patch attached. Thanks, committed. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list

Re: [HACKERS] compile error with -DOPTIMIZER_DEBUG

2009-11-22 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Jan Urbański wrote: ISTM that there's a superfluous curly brace in print_path (which only gets compiled with -DOPTIMIZER_DEBUG. Thanks, committed. You know, the last couple of times I've touched that code, I've been wondering

Re: [HACKERS] Partitioning option for COPY

2009-11-22 Thread Jan Urbański
Emmanuel Cecchet wrote: Jan, A couple of nitpicks first: o) the route_tuple_to_child recurses to child tables of child tables, which is undocumented and requires a check_stack_depth() call if it's really desirable The recursive call is as deep as the inheritance hierarchy. I am not

Re: [HACKERS] forget patch win32.mak.

2009-11-22 Thread Magnus Hagander
2009/11/22 Hiroshi Saito z-sa...@guitar.ocn.ne.jp: Hi Magnus. It is a thing left behind.:-) please apply it. Thanks! == libpq.lib(ip.obj) : error LNK2019: 未解決の外部シンボル __imp__wsaio...@36 が関 数 _pg_foreach_ifaddr で参照されました。 libpq.lib(ip.obj) : error LNK2019: 未解決の外部シンボル __imp__wsasock...@24 が

[HACKERS] WIP: log query in auto-explain

2009-11-22 Thread Andrew Dunstan
I put the attached together a while ago and neglected to send it. Basically it includes the text of the query being explained in the explain output. I think it's more important to include the query text when using auto_explain than in other explain uses, which is why I did it this way. But

Re: [HACKERS] Partitioning option for COPY

2009-11-22 Thread Stephan Szabo
On Sun, 22 Nov 2009, Emmanuel Cecchet wrote: As I explained to Tom, if the after row trigger is called asynchronously I get a relcache leak on the child table at the end of the copy operation. If the trigger is called synchronously (like a before row trigger) it works fine. Also calling the

Re: [HACKERS] WIP: log query in auto-explain

2009-11-22 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: I put the attached together a while ago and neglected to send it. Basically it includes the text of the query being explained in the explain output. I'm pretty certain this will dump core in some contexts --- you should not assume that sourceText is

Re: [HACKERS] Not safe to send CSV data message

2009-11-22 Thread Greg Stark
On Thu, Nov 19, 2009 at 3:50 AM, Andrew Dunstan and...@dunslane.net wrote: I'm fine with that. I don't remember whether I put that in or whether it came from the original patch author(s). Either way, I assume the reason was to explain why the message appeared on stderr rather than the CSVlog.

Re: [HACKERS] Partitioning option for COPY

2009-11-22 Thread Emmanuel Cecchet
Stephan Szabo wrote: On Sun, 22 Nov 2009, Emmanuel Cecchet wrote: As I explained to Tom, if the after row trigger is called asynchronously I get a relcache leak on the child table at the end of the copy operation. If the trigger is called synchronously (like a before row trigger) it works

Re: [HACKERS] Partitioning option for COPY

2009-11-22 Thread Stephan Szabo
On Sun, 22 Nov 2009, Emmanuel Cecchet wrote: Stephan Szabo wrote: On Sun, 22 Nov 2009, Emmanuel Cecchet wrote: As I explained to Tom, if the after row trigger is called asynchronously I get a relcache leak on the child table at the end of the copy operation. If the trigger is called

Re: [HACKERS] WIP: log query in auto-explain

2009-11-22 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: I put the attached together a while ago and neglected to send it. Basically it includes the text of the query being explained in the explain output. I'm pretty certain this will dump core in some contexts --- you should not

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread Craig Ringer
On 23/11/2009 4:15 AM, Scott Marlowe wrote: On Sun, Nov 22, 2009 at 12:50 PM, Thom Brown thombr...@gmail.com wrote: Hi, This should be simple, but for some reason I'm not quite sure what the solution is. I want to be able to update the value of a column for rows that have been updated. More

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread Thom Brown
2009/11/22 Craig Ringer cr...@postnewspapers.com.au On 23/11/2009 4:15 AM, Scott Marlowe wrote: On Sun, Nov 22, 2009 at 12:50 PM, Thom Brown thombr...@gmail.com wrote: Hi, This should be simple, but for some reason I'm not quite sure what the solution is. I want to be able to update

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread Tom Lane
Craig Ringer cr...@postnewspapers.com.au writes: I do think this comes up often enough that a built-in trigger update named column with result of expression on insert trigger might be desirable. There's something of the sort in contrib already, I believe, though it's so old it still uses

Re: [HACKERS] operator exclusion constraints

2009-11-22 Thread David Fetter
On Fri, Nov 20, 2009 at 01:36:59PM +0900, Josh Berkus wrote: RObert, I guess I'm going to have to vote -1 on this proposal. I code see inventing a pgsql-specific SQLSTATE value for exclusion constraints, since they will be a pgsql-specific extension, but reusing the unique key

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread silly8888
MySQL had the following syntax available: `updated_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP I wonder supporting this syntax would speed things up a little bit. Here's a simple benchmark about the situation we are discussing here: There are 2 tables:

Re: [HACKERS] forget patch win32.mak.

2009-11-22 Thread Hiroshi Saito
Hi. Only for CVS-HEAD, not need backpatch. I checked REL8_4_STABLE is this. == nmake -f win32.mak ...snip Microsoft (R) Manifest Tool version 5.2.3790.2076 Copyright (c) Microsoft Corporation 2005. All rights reserved. cd ..\.. echo All Win32 parts have been built! All Win32 parts

Re: [HACKERS] Not safe to send CSV data message

2009-11-22 Thread Tom Lane
Greg Stark gsst...@mit.edu writes: ISTM the danger is that someone looks at the regular logs and isn't aware that some messages went to someplace else. In which case bleating to the someplace else is unhelpful. Yes, that's my problem with it in a nutshell. Anybody who is smart enough to look

Re: [HACKERS] Partitioning option for COPY

2009-11-22 Thread Robert Haas
On Sun, Nov 22, 2009 at 12:35 PM, Jan Urbański wulc...@wulczer.org wrote: I was thinking more about SGML docs. They could mention that BEFORE triggers are fired both for the parent table and for the child table, while AFTER triggers will only be called on the target table. I'd add a sentence

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread Robert Haas
On Sun, Nov 22, 2009 at 6:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Craig Ringer cr...@postnewspapers.com.au writes: I do think this comes up often enough that a built-in trigger update named column with result of expression on insert trigger might be desirable. There's something of the sort

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sun, Nov 22, 2009 at 6:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: CREATE IF NOT EXISTS has been proposed and rejected before, more than once.  Please see the archives. Search for CINE to find the discussions. This is a good place to start:

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread Andrew Dunstan
Tom Lane wrote: [ thinks for awhile... ] Actually, CREATE LANGUAGE is unique among creation commands in that the common cases have no parameters, at least not since we added pg_pltemplate. So you could imagine defining CINE for a language as disallowing any parameters and having these

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Part of the motivation for allowing inline blocks was to allow for conditional logic. I don't think that argument really applies to this case, because the complaint was about not being sure if plpgsql is installed. If it isn't, you can hardly use a

Re: [HACKERS] [COMMITTERS] pgsql: Remove -w (--ignore-all-space) option from pg_regress's diff

2009-11-22 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Tom Lane wrote: Remove -w (--ignore-all-space) option from pg_regress's diff calls. Looks like this has broken on Windows due to different line endings, which -w hid from us. Yeah. I was waiting for brown_bat to report in before bringing this up

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread Scott Marlowe
On Sun, Nov 22, 2009 at 10:19 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andrew Dunstan and...@dunslane.net writes: Part of the motivation for allowing inline blocks was to allow for conditional logic. I don't think that argument really applies to this case, because the complaint was about not

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread Craig Ringer
Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: Part of the motivation for allowing inline blocks was to allow for conditional logic. I don't think that argument really applies to this case, because the complaint was about not being sure if plpgsql is installed. If it isn't,

Re: [HACKERS] [GENERAL] Updating column on row update

2009-11-22 Thread Scott Marlowe
On Sun, Nov 22, 2009 at 10:41 PM, Craig Ringer cr...@postnewspapers.com.au wrote: Tom Lane wrote: It'd be a HUGE benefit in deployment and update scripts to have PL/PgSQL  installed and available by default, at least to the superuser and to the DB owner. Are there any known security problems

[HACKERS] Re: [COMMITTERS] pgsql: Remove -w (--ignore-all-space) option from pg_regress's diff

2009-11-22 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: Tom Lane wrote: Remove -w (--ignore-all-space) option from pg_regress's diff calls. Looks like this has broken on Windows due to different line endings, which -w hid from us. Yeah. I was waiting for

Re: [HACKERS] operator exclusion constraints

2009-11-22 Thread Peter Eisentraut
On sön, 2009-11-22 at 16:03 -0800, David Fetter wrote: What, if anything, does the standard have to say about violations of ASSERTIONs? I know these aren't ASSERTIONs, but they much more closely resemble them than they do UNIQUE constraints. An assertion is by definition a constraint that is