Re: [HACKERS] Allowing empty target list in SELECT (1b4f7f93b4693858cb983af3cd557f6097dab67b)

2014-05-02 Thread Rajeev rastogi
On 02 May 2014 10:00, Amit Longote Wrote: I s the following behavior perceived fix-worthy? -- note the ' 1's in the output s po stgres=# CREATE TABLE test AS SELECT; SELECT 1 postgres=# insert into test select; INSERT 0 1 Or maybe, it just means 1 'null'

[HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-05-02 Thread Ian Barwick
Hi Here is an initial version of an auditing extension for Postgres to generate log output suitable for compiling a comprehensive audit trail of database operations. Why auditing? Various laws and regulations (HIPAA, PCI DSS, EU Data Protection Directive etc.) as well as internal business

Re: [HACKERS] Allowing empty target list in SELECT (1b4f7f93b4693858cb983af3cd557f6097dab67b)

2014-05-02 Thread David Rowley
On Fri, May 2, 2014 at 3:57 PM, Amit Langote amitlangot...@gmail.comwrote: Hi, I ​s the following behavior perceived fix-worthy? -- note the ​'​ ​1's in the output ​s ​ ​po​ stgres=# CREATE TABLE test AS SELECT; SELECT 1 postgres=# insert into test select; INSERT 0 1​ ​My

Re: [HACKERS] Allowing empty target list in SELECT (1b4f7f93b4693858cb983af3cd557f6097dab67b)

2014-05-02 Thread Albe Laurenz
Amit Langote wrote: Is the following behavior perceived fix-worthy? -- note the '1's in the outputs postgres=# CREATE TABLE test AS SELECT; SELECT 1 postgres=# insert into test select; INSERT 0 1 Or maybe, it just means 1 'null' row/record and not no row at all? Right, I'd say you end

Re: [HACKERS] Allowing empty target list in SELECT (1b4f7f93b4693858cb983af3cd557f6097dab67b)

2014-05-02 Thread Amit Langote
On Fri, May 2, 2014 at 4:14 PM, David Rowley dgrowle...@gmail.com wrote: Why should the above results be any different than if I created the nocols table with a column then dropped it? Certainly removing all of the records on the drop of the last column would be wrong. I see, dropping the

Re: [HACKERS] Proposal for Merge Join for Non '=' Operators

2014-05-02 Thread Dilip kumar
On 29 April 2014 13:28, Hadi Moshayedi Wrote, This looks like a great improvement. Repeating Nicolas's question, do you have a real-world example of such joins? I can think of some scenario where, user need to self-join and find the comparison with other tuples, For example, list down all the

Re: [HACKERS] includedir_internal headers are not self-contained

2014-05-02 Thread Christoph Berg
Re: Tom Lane 2014-05-02 9995.1398994...@sss.pgh.pa.us The patch is certainly too invasive to consider back-patching into 9.3, though. Understood. I feel unsure about this. I agree the patch is quite invasive. Leaving 9.3 in a broken state seems problematic. In particular I'm not sure

Re: [HACKERS] Obsolete coding in fork_process.c

2014-05-02 Thread Noah Misch
On Thu, May 01, 2014 at 11:07:51PM -0400, Tom Lane wrote: Noah Misch n...@leadboat.com writes: On Thu, May 01, 2014 at 08:44:46PM -0400, Tom Lane wrote: You're only considering one aspect of the problem. Yeah, you might not get duplicated output unless system() prints something before

Re: [HACKERS] need xmllint on borka

2014-05-02 Thread Alvaro Herrera
Tom Lane wrote: (The subtext here is that borka is absolutely not an acceptable place to encounter documentation build failures. By the time we're at that stage of the release cycle, I don't really care what xmllint might have to say; there isn't going to be time to make it happy.) Borka is

Re: [HACKERS] need xmllint on borka

2014-05-02 Thread Alvaro Herrera
Peter Eisentraut wrote: I have been working on making the DocBook XML output valid. The first part was bb4eefe7bf518e42c73797ea37b033a5d8a8e70a, I now have the rest ready, but I'll spare you the mostly mechanical 200kB patch for now. In addition, I'd like to add the attached patch with an

[HACKERS] Sending out a request for more buildfarm animals?

2014-05-02 Thread Andres Freund
Hi, There's pretty little coverage of non mainstream platforms/compilers in the buildfarm atm. Maybe we should send an email on -announce asking for new ones? There's no coverage for OS-wise; * AIX (at all) * HP-UX (for master at least) (* Tru64) (* UnixWare) Architecture wise there's no

[HACKERS] elog a stack trace

2014-05-02 Thread Jeff Janes
Does anyone have any hints on how to get a stack trace programmatically, rather than trying to run ps to get the pid and then attach gdb to a ephemeral process and hoping the situation has not been changed while you are doing that? I'd like to set log_error_verbosity = stack or

Re: [HACKERS] elog a stack trace

2014-05-02 Thread Andres Freund
Hi, On 2014-05-02 08:16:39 -0700, Jeff Janes wrote: Does anyone have any hints on how to get a stack trace programmatically, rather than trying to run ps to get the pid and then attach gdb to a ephemeral process and hoping the situation has not been changed while you are doing that? I'd like

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-05-02 Thread Josh Berkus
On 05/01/2014 11:19 PM, Ian Barwick wrote: Here is an initial version of an auditing extension for Postgres to generate log output suitable for compiling a comprehensive audit trail of database operations. Cool! Looking forward to seeing it around the 9.5 cycle. -- Josh Berkus PostgreSQL

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-05-02 Thread Stephen Frost
Ian, * Ian Barwick (i...@2ndquadrant.com) wrote: Here is an initial version of an auditing extension for Postgres to generate log output suitable for compiling a comprehensive audit trail of database operations. Neat stuff. Why auditing? Yeah, we really need to improve here. I've been

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-05-02 Thread Josh Berkus
On 05/02/2014 11:04 AM, Stephen Frost wrote: This is something I've been mulling over for a couple of years (you can see notes from the discussion at the 2011 hacker meeting on the wiki about how we might change our logging system to allow for better filtering). Logging hooks. We really need

[HACKERS] Supporting multiple column assignment in UPDATE (9.5 project)

2014-05-02 Thread Tom Lane
I've been thinking about how we might implement the multiple column assignment UPDATE syntax that was introduced in SQL:2003. This feature allows you to do UPDATE table SET ..., (column, column, ...) = row-valued expression, ... where the system arranges to evaluate the row-valued expression

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-05-02 Thread Stephen Frost
* Josh Berkus (j...@agliodbs.com) wrote: Logging hooks. We really need some contrib/ modules which take advantage of these. I'm aware and I really am not convinced that pushing all of this to contrib modules using the hooks is the right approach- for one thing, it certainly doesn't seem to me

[HACKERS] Faster array_length()

2014-05-02 Thread Hadi Moshayedi
Hello, The attached patch improves the performance of array_length() by detoasting only the overhead part of the datum. Here is a test case: postgres=# create table array_length_test as select array_agg(a) a from generate_series(1, 1) a, generate_series(1, 1) b group by b; Without the

Re: [HACKERS] [COMMITTERS] pgsql: Fix quiet inline configure test for newer clang compilers.

2014-05-02 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-05-01 20:16:48 +, Tom Lane wrote: Fix quiet inline configure test for newer clang compilers. Since it doesn't seem to have caused any problems I think this should be backpatched. Hearing no objections, done.

Re: [HACKERS] Supporting multiple column assignment in UPDATE (9.5 project)

2014-05-02 Thread Merlin Moncure
On Fri, May 2, 2014 at 1:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: I've been thinking about how we might implement the multiple column assignment UPDATE syntax that was introduced in SQL:2003. This feature allows you to do UPDATE table SET ..., (column, column, ...) = row-valued expression,

Re: [HACKERS] Supporting multiple column assignment in UPDATE (9.5 project)

2014-05-02 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes: On Fri, May 2, 2014 at 1:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: I've been thinking about how we might implement the multiple column assignment UPDATE syntax that was introduced in SQL:2003. This feature allows you to do UPDATE table SET ...,

Re: [HACKERS] Supporting multiple column assignment in UPDATE (9.5 project)

2014-05-02 Thread Merlin Moncure
On Fri, May 2, 2014 at 2:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Merlin Moncure mmonc...@gmail.com writes: 2) I often wish that you could reference the table (or it's alias) directly as the field list. UPDATE foo f set f = (...)::foo; or even UPDATE foo SET foo = foo; Hm. You could get

Re: [HACKERS] Supporting multiple column assignment in UPDATE (9.5 project)

2014-05-02 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes: On Fri, May 2, 2014 at 2:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: But I don't think your suggestions of the table name or alias work; they could conflict with an actual column name. Presumably it'd follow similar rules to SELECT -- resolve the column

Re: [HACKERS] Supporting multiple column assignment in UPDATE (9.5 project)

2014-05-02 Thread Merlin Moncure
On Fri, May 2, 2014 at 3:03 PM, Tom Lane t...@sss.pgh.pa.us wrote: Merlin Moncure mmonc...@gmail.com writes: On Fri, May 2, 2014 at 2:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: But I don't think your suggestions of the table name or alias work; they could conflict with an actual column name.

Re: [HACKERS] Sending out a request for more buildfarm animals?

2014-05-02 Thread Noah Misch
On Fri, May 02, 2014 at 05:04:01PM +0200, Andres Freund wrote: There's pretty little coverage of non mainstream platforms/compilers in the buildfarm atm. Maybe we should send an email on -announce asking for new ones? There's no coverage for OS-wise; * AIX (at all) * HP-UX (for master at

[HACKERS] regexp_replace( , , , NULL ) returns null?

2014-05-02 Thread Jim Nasby
Is there any particular reason for this: decibel@decina.local=# SELECT regexp_replace( 'a', 'a', 'b', null ) IS NULL; ?column? -- t (1 row) ISTM it’d be a lot better if it treated NULL flags the same as ‘’... -- Jim Nasby, Lead Data Architect (512) 569-9461 -- Sent via

Re: [HACKERS] regexp_replace( , , , NULL ) returns null?

2014-05-02 Thread Tom Lane
Jim Nasby jna...@enova.com writes: Is there any particular reason for this: decibel@decina.local=# SELECT regexp_replace( 'a', 'a', 'b', null ) IS NULL; ?column? -- t (1 row) Yeah: regexp_replace is strict. ISTM it’d be a lot better if it treated NULL flags the same as ‘’...

[HACKERS] New and interesting replication issues with 9.2.8 sync rep

2014-05-02 Thread Josh Berkus
Just got a report of a replication issue with 9.2.8 from a community member: Here's the sequence: 1) A -- B (sync rep) 2) Shut down B 3) Shut down A 4) Start up B as a master 5) Start up A as sync replica of B 6) A successfully joins B as a sync replica, even though its transaction log is

Re: [HACKERS] Faster array_length()

2014-05-02 Thread Tom Lane
Hadi Moshayedi h...@moshayedi.net writes: The attached patch improves the performance of array_length() by detoasting only the overhead part of the datum. It looks to me like this would actually make things worse for cases where the input array wasn't toasted-out-of-line (because it would

Re: [HACKERS] Faster array_length()

2014-05-02 Thread Hadi Moshayedi
Thanks for looking into this. With that in mind, I was surprised that your test case showed any improvement at all --- it looks like the arrays aren't getting compressed for some reason. You are right, it seems that they were not getting compressed, probably because the arrays were seq

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-05-02 Thread Abhijit Menon-Sen
At 2014-05-02 14:04:27 -0400, sfr...@snowman.net wrote: I'd really like to see us be able to, say, log to a table and have more fine-grained control over what is logged, without needing an extension. There were several factors we considered in our work: 1. We did the minimum possible to

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-05-02 Thread Abhijit Menon-Sen
At 2014-05-02 14:22:23 -0400, sfr...@snowman.net wrote: I'm aware and I really am not convinced that pushing all of this to contrib modules using the hooks is the right approach- for one thing, it certainly doesn't seem to me that we've actually gotten a lot of traction from people to

[HACKERS] tab completion for setting search_path

2014-05-02 Thread Jeff Janes
I've been working with an app that uses a schema name whose spelling is hard to type, and the lack of tab completion for SET search_path TO was bugging me. So see attached. I filter out the system schemata, but not public. For commit fest next. Cheers, Jeff