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

2013-05-08 Thread Fabien COELHO
Dear Robins, Here is an updated patch that uses different schema / role names for different tests (as per commitfest site feedback). Short review about this version of the patch: This patch work for me. This test is a good thing and allows schema to be thoroughly tested, including corner

Re: [HACKERS] Add some regression tests for SEQUENCE

2013-05-08 Thread Fabien COELHO
Have provided an updated patch as per Fabien's recent response on Commitfest site. Any and all feedback is appreciated. Review: This patch works for me. It adds valuable sequence test cases, especially trying corner cases with expected errors and permission denials. I suggest to accept

Re: [HACKERS] about index inheritance

2013-05-08 Thread Vincenzo Melandri
On Tue, May 7, 2013 at 11:55 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, May 6, 2013 at 9:30 AM, Vincenzo Melandri vmelan...@imolinfo.it wrote: Hi guys, My first post here :) I stumbled into the same problem as this guy

Re: [HACKERS] GSOC Student Project Idea

2013-05-08 Thread Heikki Linnakangas
On 24.04.2013 14:31, Florian Pflug wrote: On Apr23, 2013, at 23:25 , Alexander Korotkovaekorot...@gmail.com wrote: I've taken a brief look on the paper and implementation. As I can see iDistance implements some global building strategy. I mean, for example, it selects some point, calculates

Re: [HACKERS] [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint

2013-05-08 Thread Andres Freund
On 2013-05-07 21:45:02 -0400, Tom Lane wrote: Greg Stark st...@mit.edu writes: If we just reverted your fix and didn't fix it in 9.2 that would also fix the crash right? The bug was only that it leaked the fact that the view was provably empty from the definition? Well, it might fail to

Re: [HACKERS] GSOC Student Project Idea

2013-05-08 Thread Heikki Linnakangas
On 24.04.2013 22:10, Michael Schuh wrote: Thank you both for the very helpful feedback. Perhaps the scope of this project (application's completeness criteria) is better as a feasibility prototyping of the global/distance-based index strategy with B+-tree and/or GiST extension possibilities.

Re: [HACKERS] Cube extension improvement, GSoC

2013-05-08 Thread Alexander Korotkov
On Sat, May 4, 2013 at 11:19 PM, Stas Kelvich stanc...@gmail.com wrote: I think we have at least 3 data types more or less similar to cube. 1) array of ranges 2) range of arrays 3) 2d arrays Semantically cube is most close to array or ranges. However array of ranges have huge storage

Re: [HACKERS] Terminology issue: suffix tree

2013-05-08 Thread Heikki Linnakangas
On 06.05.2013 14:10, Alexander Korotkov wrote: On Sat, May 4, 2013 at 10:27 PM, Alexander Korotkovaekorot...@gmail.comwrote: In suffix tree we insert every suffix of source string into the tree. http://en.wikipedia.org/wiki/Suffix_tree Actually opclass implemented radix tree or patricia tree.

Re: [HACKERS] Terminology issue: suffix tree

2013-05-08 Thread Alexander Korotkov
On Wed, May 8, 2013 at 3:50 PM, Heikki Linnakangas hlinnakan...@vmware.comwrote: On 06.05.2013 14:10, Alexander Korotkov wrote: On Sat, May 4, 2013 at 10:27 PM, Alexander Korotkovaekorot...@gmail.com **wrote: In suffix tree we insert every suffix of source string into the tree.

Re: [HACKERS] [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint

2013-05-08 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-05-07 21:45:02 -0400, Tom Lane wrote: Well, it might fail to report a permissions violation when the not-allowed-to-be-accessed relation could be proven to yield no rows. Couldn't it also cause tables not to be locked that ought to be? That

[HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Karol Trzcionka
Hello, as a continuation of my proposal expanding RETURNING syntax by AFTER/BEFORE, there can be enough time to implement RETURNING for COPY. I'd like to hear your opinion on that. My draft idea is: COPY FROM ... RETURNING table_name.* - returns all values copied to table after all triggers invoke

Re: [HACKERS] improving PL/Python builds on OS X

2013-05-08 Thread Dave Page
On Fri, Dec 21, 2012 at 5:45 PM, Peter Eisentraut pete...@gmx.net wrote: The PL/Python build on OS X is currently hardcoded to use the system Python install. If you try to override this when running configure, you get a mysterious mix-and-match build. If you want to build against your own

Re: [HACKERS] XLogFlush invoked about twice as much after 9.2 group commit enhancement

2013-05-08 Thread Jeff Janes
On Tue, May 7, 2013 at 9:23 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, May 7, 2013 at 12:48 PM, Jeff Janes jeff.ja...@gmail.com wrote: Anyway, I don't see this behavior change when turning on wal_debug and looking in the logfiles for 'xlog flush request' messages. That could have

Re: [HACKERS] Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint

2013-05-08 Thread Tom Lane
Greg Stark st...@mit.edu writes: That's kind of dismaying. ORMs have a tendency to create queries like this and people may have even written such queries by hand and tested them to determine that postgres was able to exclude the useless relation. To have them install a security update and

Re: [HACKERS] improving PL/Python builds on OS X

2013-05-08 Thread Peter Eisentraut
On 5/8/13 11:51 AM, Dave Page wrote: This patch seems to have broken the build for our installers for 9.3. Because we need a consistent build of the PL interpretors on all the platforms we support, we use the ActiveState distributions of Perl, Python and TCL (we can't rely on vendor supplied

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Pavel Stehule
Hello why? What is motivation? What is use case? Regards Pavel 2013/5/8 Karol Trzcionka karl...@gmail.com Hello, as a continuation of my proposal expanding RETURNING syntax by AFTER/BEFORE, there can be enough time to implement RETURNING for COPY. I'd like to hear your opinion on that.

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Tom Lane
Karol Trzcionka karl...@gmail.com writes: as a continuation of my proposal expanding RETURNING syntax by AFTER/BEFORE, there can be enough time to implement RETURNING for COPY. No there isn't; what you suggest would require FE/BE protocol extensions, making it several orders of magnitude more

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Heikki Linnakangas
On 08.05.2013 19:44, Tom Lane wrote: Karol Trzcionkakarl...@gmail.com writes: as a continuation of my proposal expanding RETURNING syntax by AFTER/BEFORE, there can be enough time to implement RETURNING for COPY. No there isn't; what you suggest would require FE/BE protocol extensions,

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: On 08.05.2013 19:44, Tom Lane wrote: No there isn't; what you suggest would require FE/BE protocol extensions, making it several orders of magnitude more work than the other thing. I'd imagine that the flow would go something like this: BE

Re: [HACKERS] improving PL/Python builds on OS X

2013-05-08 Thread Dave Page
On Wed, May 8, 2013 at 5:34 PM, Peter Eisentraut pete...@gmx.net wrote: On 5/8/13 11:51 AM, Dave Page wrote: This patch seems to have broken the build for our installers for 9.3. Because we need a consistent build of the PL interpretors on all the platforms we support, we use the ActiveState

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Dimitri Fontaine
Karol Trzcionka karl...@gmail.com writes: as a continuation of my proposal expanding RETURNING syntax by What about implementing support for OLD/NEW in per-statement triggers? I guess you would expose the data via a SRF. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL :

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Andrew Dunstan
On 05/08/2013 01:16 PM, Tom Lane wrote: That would require the backend to buffer the entire query response, which isn't a great idea. I would expect that such an operation would need to interleave CopyData to the backend with DataRow responses. Such a thing could possibly be built on

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Jonathan S. Katz
On May 8, 2013, at 1:16 PM, Tom Lane wrote: Heikki Linnakangas hlinnakan...@vmware.com writes: On 08.05.2013 19:44, Tom Lane wrote: No there isn't; what you suggest would require FE/BE protocol extensions, making it several orders of magnitude more work than the other thing. I'd imagine

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread David Fetter
On Wed, May 08, 2013 at 01:16:14PM -0400, Tom Lane wrote: Heikki Linnakangas hlinnakan...@vmware.com writes: On 08.05.2013 19:44, Tom Lane wrote: No there isn't; what you suggest would require FE/BE protocol extensions, making it several orders of magnitude more work than the other thing.

Re: [HACKERS] Re: [COMMITTERS] pgsql: Fix permission tests for views/tables proven empty by constraint

2013-05-08 Thread Andres Freund
On 2013-05-08 12:30:31 -0400, Tom Lane wrote: Greg Stark st...@mit.edu writes: That's kind of dismaying. ORMs have a tendency to create queries like this and people may have even written such queries by hand and tested them to determine that postgres was able to exclude the useless

Re: [HACKERS] Terminology issue: suffix tree

2013-05-08 Thread Heikki Linnakangas
On 08.05.2013 15:49, Alexander Korotkov wrote: On Wed, May 8, 2013 at 3:50 PM, Heikki Linnakangas hlinnakan...@vmware.comwrote: Yeah. The data structure in contrib/unaccent seems to be a plain old trie, rather than a radix trie, though. According to wikipedia at least, the difference is that

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Ryan Kelly
On Wed, May 05/08/13, 2013 at 10:55:40AM -0700, David Fetter wrote: On Wed, May 08, 2013 at 01:16:14PM -0400, Tom Lane wrote: Heikki Linnakangas hlinnakan...@vmware.com writes: On 08.05.2013 19:44, Tom Lane wrote: No there isn't; what you suggest would require FE/BE protocol

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Stephen Frost
* Ryan Kelly (rpkell...@gmail.com) wrote: COPY ... RETURNING would certainly be useful to apply additional transformations to the data before finally sending it to its ultimate destination. If we really think that COPY ... RETURNING is only going to be used in a CTE or similar, then we could

[HACKERS] Taking the varattno in args (where part of a query)

2013-05-08 Thread carla celiberti
Hi everyone, I'm working on a project and one of my task is trying to take the where part of the queries.I'm programming inside the function exec_simple_query in postgres.c.I searched inside the source code and how I've understood I need to take the varattno in args in qpqual, is it right?If

Re: [HACKERS] Graph datatype addition

2013-05-08 Thread Atri Sharma
On Thu, May 2, 2013 at 7:58 AM, Atri Sharma atri.j...@gmail.com wrote: Sent from my iPad On 02-May-2013, at 4:33, Misa Simic misa.si...@gmail.com wrote: On Wednesday, May 1, 2013, Atri Sharma wrote: Hi all, Please find a probable prototype for the same: struct GraphNode { Oid

Re: [HACKERS] Graph datatype addition

2013-05-08 Thread Jim Nasby
On 5/8/13 1:40 PM, Atri Sharma wrote: On Thu, May 2, 2013 at 7:58 AM, Atri Sharma atri.j...@gmail.com wrote: Sent from my iPad On 02-May-2013, at 4:33, Misa Simic misa.si...@gmail.com wrote: On Wednesday, May 1, 2013, Atri Sharma wrote: Hi all, Please find a probable prototype for the

Re: [HACKERS] Graph datatype addition

2013-05-08 Thread Atri Sharma
Your second drawing didn't really make any sense to me. :( I do think it would be most productive to focus on what the API for dealing with graph data would look like before trying to handle the storage aspect. The storage is potentially dirt-simple, as others have shown. The only challenge

Re: [HACKERS] about index inheritance

2013-05-08 Thread Martijn van Oosterhout
On Wed, May 08, 2013 at 10:19:08AM +0200, Vincenzo Melandri wrote: On Tue, May 7, 2013 at 11:55 PM, Robert Haas robertmh...@gmail.com wrote: This is a really hard problem. If you pick this as your first project hacking on PostgreSQL, you will almost certainly fail. Thank you very much, i

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Jim Nasby
On 5/8/13 12:54 PM, Jonathan S. Katz wrote: On May 8, 2013, at 1:16 PM, Tom Lane wrote: Heikki Linnakangas hlinnakan...@vmware.com writes: On 08.05.2013 19:44, Tom Lane wrote: No there isn't; what you suggest would require FE/BE protocol extensions, making it several orders of magnitude more

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Jim Nasby
On 5/8/13 12:33 PM, Dimitri Fontaine wrote: Karol Trzcionka karl...@gmail.com writes: as a continuation of my proposal expanding RETURNING syntax by What about implementing support for OLD/NEW in per-statement triggers? I guess you would expose the data via a SRF. Per statement NEW/OLD is

Re: [HACKERS] about index inheritance

2013-05-08 Thread Jim Nasby
On 5/8/13 2:17 PM, Martijn van Oosterhout wrote: On Wed, May 08, 2013 at 10:19:08AM +0200, Vincenzo Melandri wrote: On Tue, May 7, 2013 at 11:55 PM, Robert Haas robertmh...@gmail.com wrote: This is a really hard problem. If you pick this as your first project hacking on PostgreSQL, you will

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Andrew Dunstan
On 05/08/2013 03:23 PM, Jim Nasby wrote: WITH new_data AS ( COPY FROM ... RETURNING id, field_to_check ) Why is this better than this, which you can do today? WITH new_data AS ( INSERT into ... FROM foreign_table_with_file_fdw RETURNING ... ) The whole reason I

Re: [HACKERS] RETURNING syntax for COPY

2013-05-08 Thread Ryan Kelly
On Wed, May 05/08/13, 2013 at 03:38:10PM -0400, Andrew Dunstan wrote: On 05/08/2013 03:23 PM, Jim Nasby wrote: WITH new_data AS ( COPY FROM ... RETURNING id, field_to_check ) Why is this better than this, which you can do today? WITH new_data AS ( INSERT into ...

Re: [HACKERS] GSOC Student Project Idea

2013-05-08 Thread Jim Nasby
On 5/8/13 3:54 AM, Heikki Linnakangas wrote: On 24.04.2013 14:31, Florian Pflug wrote: On Apr23, 2013, at 23:25 , Alexander Korotkovaekorot...@gmail.com wrote: I've taken a brief look on the paper and implementation. As I can see iDistance implements some global building strategy. I mean, for

[HACKERS] Re: [GENERAL] pg_upgrade fails, mismatch of relation OID - 9.1.9 to 9.2.4

2013-05-08 Thread Bruce Momjian
On Wed, May 8, 2013 at 02:27:18PM -0400, Evan D. Hoffman wrote: If you want to start the old cluster, you will need to remove the .old suffix from /var/lib/pgsql/9.1/data/global/pg_control.old. Because link mode was used, the old cluster cannot be safely started once the new cluster has been

Re: [HACKERS] corrupt pages detected by enabling checksums

2013-05-08 Thread Jim Nasby
On 4/5/13 6:39 PM, Jeff Davis wrote: On Fri, 2013-04-05 at 10:34 +0200, Florian Pflug wrote: Maybe we could scan forward to check whether a corrupted WAL record is followed by one or more valid ones with sensible LSNs. If it is, chances are high that we haven't actually hit the end of the WAL.

Re: [HACKERS] Proposal to add --single-row to psql

2013-05-08 Thread Jim Nasby
On 5/1/13 7:36 PM, Robert Haas wrote: On Mon, Apr 29, 2013 at 4:33 PM, Jim Nasbyj...@nasby.net wrote: On 4/28/13 7:50 AM, Craig Ringer wrote: I find it frustrating that I've never seen an @paraccel email address here and that few of the other vendors of highly customised Pg offshoots are

Re: [HACKERS] Proposal to add --single-row to psql

2013-05-08 Thread David Fetter
On Wed, May 08, 2013 at 06:08:28PM -0500, Jim Nasby wrote: On 5/1/13 7:36 PM, Robert Haas wrote: On Mon, Apr 29, 2013 at 4:33 PM, Jim Nasbyj...@nasby.net wrote: On 4/28/13 7:50 AM, Craig Ringer wrote: I find it frustrating that I've never seen an @paraccel email address here and that few

Re: [HACKERS] corrupt pages detected by enabling checksums

2013-05-08 Thread Jeff Davis
On Wed, 2013-05-08 at 17:56 -0500, Jim Nasby wrote: Apologies if this is a stupid question, but is this mostly an issue due to torn pages? IOW, if we had a way to ensure we never see torn pages, would that mean an invalid CRC on a WAL page indicated there really was corruption on that page?

Re: [HACKERS] Fast promotion failure

2013-05-08 Thread Fujii Masao
On Tue, May 7, 2013 at 6:57 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: While testing the bug from the Assertion failure at standby promotion, I bumped into a different bug in fast promotion. When the first checkpoint after fast promotion is performed, there is no guarantee that the

Re: [HACKERS] Add regression tests for COLLATE

2013-05-08 Thread Robins Tharakan
Hi, Please find attached the updated patch. Fabien pointed out that currently does not check for non-trivial locales. I am still on the learning curve about LOCALEs and so, let me know if this is a show-stopper. I guess I could look at it and get back in some time with more tests as Fabien

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

2013-05-08 Thread Robins Tharakan
Hi, Please find attached an updated patch with the said changes. I'll try to update the other patches (if they pertain to this feedback) and update on their respective threads (as well as on Commitfest). -- Robins Tharakan On 8 May 2013 13:01, Fabien COELHO coe...@cri.ensmp.fr wrote: Dear

Re: [HACKERS] improving PL/Python builds on OS X

2013-05-08 Thread Peter Eisentraut
On Wed, 2013-05-08 at 18:24 +0100, Dave Page wrote: It's failing on Linux. Even worse, it configures fine and then builds without error. There is a message spewed out by configure, but it doesn't contain the words warning or error. Given that I explicitly said I wanted Python support when I

Re: [HACKERS] Add regression tests for COLLATE

2013-05-08 Thread Tom Lane
Robins Tharakan thara...@gmail.com writes: Fabien pointed out that currently does not check for non-trivial locales. I am still on the learning curve about LOCALEs and so, let me know if this is a show-stopper. I guess I could look at it and get back in some time with more tests as Fabien

[HACKERS] Logging of PAM Authentication Failure

2013-05-08 Thread Amit Langote
Hello, When client authentication method is set to pam in pg_hba.conf, connecting using psql results in logging of authentication failure even before a password prompt is provided, nonetheless user is subsequently able to connect by providing a password. Following is what is logged: Password:

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

2013-05-08 Thread Robins Tharakan
Hi, Please find an updated patch as per comments on Commitfest (comments replicated below for ease of understanding). Feedback 1: fc: role_ro2/3 used twice? rt: Corrected in this update. Feedback 2: fc: I do not understand why asdf conveys anything about an expected failure. Association of

Re: [HACKERS] Fast promotion failure

2013-05-08 Thread Amit Kapila
On Thursday, May 09, 2013 6:29 AM Fujii Masao wrote: On Tue, May 7, 2013 at 6:57 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: While testing the bug from the Assertion failure at standby promotion, I bumped into a different bug in fast promotion. When the first checkpoint after