Re: [HACKERS] 9.1.2 ?

2011-11-10 Thread Boszormenyi Zoltan
2011-11-10 03:35 keltezéssel, Joshua D. Drake írta: On 11/09/2011 06:15 PM, Robert Haas wrote: 2011/11/9 Devrim GÜNDÜZdev...@gunduz.org: On Wed, 2011-11-09 at 21:12 -0500, Robert Haas wrote: The point is that all the packaging will be done *before* people leave to go eat Turkey. Eating

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Albe Laurenz
Magnus Hagander wrote: Is the following proposal acceptable: - Add a GUC ssl_compression, defaulting to on. - Add a client option sslcompression and an environment variable PGSSLCOMPRESSION, defaulting to 1. Seems like the reasonable thing, yes. Compression will be disabled if either

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Jan Kundrát
Hi José and Robert, thanks for your time and a review. Comments below. On 11/10/11 03:47, Robert Haas wrote: It does this already, without this patch. This patch is about CHECK constraints, not UNIQUE ones. That's right. This is how to check what the patch changes: jkt= CREATE TABLE tbl

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Dickson S. Guedes
2011/11/10 Jan Kundrát j...@flaska.net: On 11/10/11 03:47, Robert Haas wrote: It does this already, without this patch.  This patch is about CHECK constraints, not UNIQUE ones. That's right. This is how to check what the patch changes: jkt= CREATE TABLE tbl (name TEXT PRIMARY KEY, a INTEGER

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Jan Kundrát
On 11/10/11 12:41, Dickson S. Guedes wrote: jkt= UPDATE tbl SET a = -a; ERROR: new row for relation tbl violates check constraint tbl_a_check DETAIL: New row with data (x, -10) violates check constraint tbl_a_check. The last line, the detailed error message, is added by the patch. The

Re: [HACKERS] Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers

2011-11-10 Thread Nikhil Sontakke
Hi, Ok, understood. PFA, a patch against git head. We take the AccessShareLock lock on the schema in DefineRelation now. Note that we do not want to interlock with other concurrent creations in the schema. We only want to interlock with deletion activity. So even performance wise this should

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Robert Haas
On Thu, Nov 10, 2011 at 5:40 AM, Jan Kundrát j...@flaska.net wrote: That's an interesting thought. I suppose the same thing is an issue with unique keys, but they tend to not be created over huge columns, so it isn't really a problem, right? Pretty much. Would you object to a patch which

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Jan Kundrát
On 11/10/11 13:04, Robert Haas wrote: Well, if we're going to try to emit some context here, I'd suggest that we try to output only the columns implicated in the CHECK constraint, rather than the whole tuple. I'm not sure whether emitting only a certain amount of output (either total, or for

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Andrew Dunstan
On 11/08/2011 12:39 PM, Tom Lane wrote: Jeroen Vermeulenj...@xs4all.nl writes: Another reason why I believe compression is often used with encryption is to maximize information content per byte of data: harder to guess, harder to crack. Would that matter? Yes, it would. There's a reason

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Kääriäinen Anssi
What I want to find in the end is something which tells me this row causes the error. Unfortunately, as the new row of the table with the constraint is not yet on disk, it doesn't really have its own ctid, and therefore I cannot report that. (Which makes sense, obviously.) Would an error with

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Nov 10, 2011 at 5:40 AM, Jan Kundrát j...@flaska.net wrote: Would you object to a patch which outputs just the first 8kB of each column? Having at least some form of context is very useful in my case. Well, if we're going to try to emit some

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Magnus Hagander
On Thursday, November 10, 2011, Andrew Dunstan wrote: On 11/08/2011 12:39 PM, Tom Lane wrote: Jeroen Vermeulenj...@xs4all.nl writes: Another reason why I believe compression is often used with encryption is to maximize information content per byte of data: harder to guess, harder to

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Albe Laurenz
Tom Lane wrote: Is the following proposal acceptable: - Add a GUC ssl_compression, defaulting to on. - Add a client option sslcompression and an environment variable PGSSLCOMPRESSION, defaulting to 1. A GUC is entirely, completely, 100% the wrong answer. It has no way to deal with the

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Robert Haas
On Thu, Nov 10, 2011 at 10:05 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Nov 10, 2011 at 5:40 AM, Jan Kundrát j...@flaska.net wrote: Would you object to a patch which outputs just the first 8kB of each column? Having at least some form of context

[HACKERS] MPI programming in postgreSQL backend source code

2011-11-10 Thread Rudyar
do you have more documentation about OPENMP and PostgreSQL? El 09-11-2011 20:12, Greg Smith escribió: On 11/09/2011 04:10 PM, Rudyar Cortés wrote: I'm a new programmer in postgreSQL source code.. Is possible use MPI functions in postgreSQL source code? To do this the proper way, you

Re: [HACKERS] Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers

2011-11-10 Thread Tom Lane
Nikhil Sontakke nikkh...@gmail.com writes: PFA, a patch against git head. We take the AccessShareLock lock on the schema in DefineRelation now. Um ... why would we do this only for tables, and not for creations of other sorts of objects that belong to schemas? Also, if we are going to believe

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Nov 10, 2011 at 10:05 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Well, if we're going to try to emit some context here, I'd suggest that we try to output only the columns implicated in the CHECK

Re: [HACKERS] Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message

2011-11-10 Thread Jan Kundrát
On 11/10/11 16:05, Tom Lane wrote: I agree with Jan that this is probably useful; I'm pretty sure there have been requests for it before. We just have to make sure that the length of the message stays in bounds. One tip for keeping the length down: there is no value in repeating

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes: Tom Lane wrote: A GUC is entirely, completely, 100% the wrong answer. It has no way to deal with the fact that some clients may need compression and others not. You can force a certain SSL cipher on the client, why not a compression setting? To

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Robert Haas
On Thu, Nov 10, 2011 at 11:01 AM, Tom Lane t...@sss.pgh.pa.us wrote: But in any case, my objection is that there's no adequate use-case for this GUC, because it's much more sensible to set it from the client side.  We have too many GUCs already --- Josh B regularly goes on the warpath looking

[HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Αναστάσιος Αρβανίτης
I'm developing an application that requires parsing of execution plans (those produced as output by issuing an EXPLAIN [query] command). Are you aware of any Java library that I could use for this purpose? I found https://github.com/depesz/Pg--Explain but it is built in Perl. Also another

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Marko Kreen
On Thu, Nov 10, 2011 at 5:18 PM, Albe Laurenz laurenz.a...@wien.gv.at wrote: I could go and try to convince Npgsql and JDBC to accept patches to do that on the client side, but that would be more effort than I want to invest.  But then there's still closed source software like Devart

[HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Αναστάσιος Αρβανίτης
I'm developing an application that requires parsing of execution plans (those produced as output by issuing an EXPLAIN [query] command). Are you aware of any Java library that I could use for this purpose? I found https://github.com/depesz/Pg--Explain but it is built in Perl. Also another

Re: [HACKERS] Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers

2011-11-10 Thread Nikhil Sontakke
Um ... why would we do this only for tables, and not for creations of other sorts of objects that belong to schemas? Right, we need to do it for other objects like functions etc. too. Also, if we are going to believe that this is a serious problem, what of ALTER ... SET SCHEMA? I admit,

Re: [HACKERS] warning in pg_upgrade

2011-11-10 Thread Bruce Momjian
Robert Haas wrote: On Thu, Nov 3, 2011 at 3:45 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Kevin Grittner kevin.gritt...@wicourts.gov wrote: Untested patch attached for purposes of discussion. I got in a little testing on it -- not only does this patch eliminate the

Re: [HACKERS] pg_dump 9.1.1 hanging (collectSecLabels gets 0 labels)

2011-11-10 Thread Steve Singer
On 11-11-09 06:35 PM, Tom Lane wrote: Steve Singerssin...@ca.afilias.info writes: I've tracked the issue down to collectSecLabels in pg_dump.c SELECT label, provider, classoid, objoid, objsbid FROM pg_catalog.pg_seclabel; returns 0 rows. The code in collectSecLabels() is not prepared

Re: [HACKERS] IDLE in transaction introspection

2011-11-10 Thread Scott Mead
On Nov 5, 2011 9:02 AM, Greg Smith g...@2ndquadrant.com wrote: On 11/04/2011 05:01 PM, Tom Lane wrote: Scott Meadsco...@openscg.com writes: I leave the waiting flag in place for posterity. With this in mind, is the consensus: RUNNING or ACTIVE Personally, I'd go for

Re: [HACKERS] IDLE in transaction introspection

2011-11-10 Thread Bruce Momjian
Scott Mead wrote: On Wed, Nov 2, 2011 at 4:12 AM, Albe Laurenz laurenz.a...@wien.gv.atwrote: Andrew Dunstan wrote: On 11/01/2011 09:52 AM, Tom Lane wrote: I'm for just redefining the query field as current or last query. +1 I could go either way on whether to rename it.

Re: [HACKERS] pg_dump 9.1.1 hanging (collectSecLabels gets 0 labels)

2011-11-10 Thread Tom Lane
Steve Singer ssin...@ca.afilias.info writes: The man page for malloc on AIX is pretty clear on what happens when you try to malloc 0 bytes. It returns NULL. Yes, that's a pretty common behavior for malloc(0). It should not cause a problem here AFAICS. ... Oh, I see, the problem is that

Re: [HACKERS] IDLE in transaction introspection

2011-11-10 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: It might be cleaner to use booleans: active: t/f in transaction: t/f I don't think so, because that makes some very strict assumptions that there are exactly four interesting states (an assumption that isn't even true today, to judge

Re: [HACKERS] IDLE in transaction introspection

2011-11-10 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: It might be cleaner to use booleans: active: t/f in transaction: t/f I don't think so, because that makes some very strict assumptions that there are exactly four interesting states (an assumption that isn't even

Re: [HACKERS] Is there a good reason we don't have INTERVAL 'infinity'?

2011-11-10 Thread Bruce Momjian
Brar Piening wrote: Josh Berkus wrote: Hackers, Is there a reason why INTERVAL 'infinity' is not implemented? That is, an interval which is larger than all defined intervals, and which added to any timestamp turns it into 'infinity'. Or is it just Round TUITs? Probably the

Re: [HACKERS] const correctness

2011-11-10 Thread Kevin Grittner
Florian Pflug f...@phlo.org wrote: On Nov9, 2011, at 22:54 , Kevin Grittner wrote: Tom Lane t...@sss.pgh.pa.us wrote: I don't doubt that just duplicating macros and inlineable functions is a wash performance-wise (in fact, in principle it shouldn't change the generated code at all). I

Re: [HACKERS] IDLE in transaction introspection

2011-11-10 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Well, we could use an optional details string for that. If not, we are still using the magic-string approach, which I thought we didn't like. No, we're not using magic strings, we're using an enum --- maybe not an officially declared enum type, but it's

Re: [HACKERS] const correctness

2011-11-10 Thread Peter Eisentraut
On ons, 2011-11-09 at 10:49 -0500, Tom Lane wrote: Now admittedly you can hack it, in the same spirit as the C library functions that are declared to take const pointers and return non-const pointers to the very same data Which C library functions do that? -- Sent via pgsql-hackers mailing

Re: [HACKERS] pg_dump 9.1.1 hanging (collectSecLabels gets 0 labels)

2011-11-10 Thread Steve Singer
On 11-11-10 02:00 PM, Tom Lane wrote: Steve Singerssin...@ca.afilias.info writes: The man page for malloc on AIX is pretty clear on what happens when you try to malloc 0 bytes. It returns NULL. Yes, that's a pretty common behavior for malloc(0). It should not cause a problem here AFAICS.

Re: [HACKERS] -Wcast-qual cleanup, part 1

2011-11-10 Thread Peter Eisentraut
On mån, 2011-11-07 at 10:07 -0500, Tom Lane wrote: 2. Macros accessing structures should come in two variants: a get version, and a set/anything else version, so that the get version can preserve the const qualifier. I'm not prepared to buy into that as a general coding rule. Maybe

Re: [HACKERS] const correctness

2011-11-10 Thread Kevin Grittner
Peter Eisentraut pete...@gmx.net wrote: On ons, 2011-11-09 at 10:49 -0500, Tom Lane wrote: Now admittedly you can hack it, in the same spirit as the C library functions that are declared to take const pointers and return non-const pointers to the very same data Which C library functions do

Re: [HACKERS] foreign key locks, 2nd attempt

2011-11-10 Thread Bruce Momjian
Alvaro Herrera wrote: Hello, After some rather extensive rewriting, I submit the patch to improve foreign key locks. To recap, the point of this patch is to introduce a new lock tuple mode, that lets the RI code obtain a lighter lock on tuples, which doesn't conflict with updates that do

Re: [HACKERS] const correctness

2011-11-10 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On ons, 2011-11-09 at 10:49 -0500, Tom Lane wrote: Now admittedly you can hack it, in the same spirit as the C library functions that are declared to take const pointers and return non-const pointers to the very same data Which C library functions do

Re: [HACKERS] pg_dump 9.1.1 hanging (collectSecLabels gets 0 labels)

2011-11-10 Thread Tom Lane
Steve Singer ssin...@ca.afilias.info writes: On 11-11-10 02:00 PM, Tom Lane wrote: ... Oh, I see, the problem is thatlabels[-1] might not compare to labels[0] the way we want. I think only the first hunk of your patch is actually necessary. Yes the problem is still fixed if I only apply the

Re: [HACKERS] const correctness

2011-11-10 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Tom mentioned the strchr() function, which does do that. I don't actually find that surprising given my understanding of the semantics. That means that the function is promising not to modify the character array, but is not asserting that it

Re: [HACKERS] pl/python custom datatype parsers

2011-11-10 Thread Peter Eisentraut
On tis, 2011-11-08 at 16:08 -0500, Andrew Dunstan wrote: On 03/01/2011 11:50 AM, Peter Eisentraut wrote: On fre, 2011-02-11 at 16:49 +0100, Jan Urbański wrote: I believe it's (b). But as we don't have time for that discussion that late in the release cycle, I think we need to consider it

Re: [HACKERS] type privileges and default privileges

2011-11-10 Thread Peter Eisentraut
On ons, 2011-11-09 at 00:21 -0500, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Let me put this differently. Should we either continue to hardcode the default privileges in the acldefault() function, or should we instead initialize the system catalogs with an entry in

Re: [HACKERS] foreign key locks, 2nd attempt

2011-11-10 Thread Christopher Browne
On Sun, Nov 6, 2011 at 2:28 AM, Jeroen Vermeulen j...@xs4all.nl wrote: On 2011-11-04 01:12, Alvaro Herrera wrote: I would like some opinions on the ideas on this patch, and on the patch itself.  If someone wants more discussion on implementation details of each part of the patch, I'm happy to

Re: [HACKERS] foreign key locks, 2nd attempt

2011-11-10 Thread Pavel Stehule
2011/11/10 Christopher Browne cbbro...@gmail.com: On Sun, Nov 6, 2011 at 2:28 AM, Jeroen Vermeulen j...@xs4all.nl wrote: On 2011-11-04 01:12, Alvaro Herrera wrote: I would like some opinions on the ideas on this patch, and on the patch itself.  If someone wants more discussion on

Re: [HACKERS] pg_upgrade automatic testing

2011-11-10 Thread Bruce Momjian
Peter Eisentraut wrote: On m?n, 2011-09-19 at 07:06 +0300, Peter Eisentraut wrote: I found a simpler way to get this working. Just hack up the catalogs for the new path directly. So I can now run this test suite against older versions as well, like this: contrib/pg_upgrade$ make

Re: [HACKERS] const correctness

2011-11-10 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: The problem with it of course is that mistaken use could have the effect of casting-away-const, which is exactly what we hoped to prevent. Still, there may not be a better solution. Yeah, I've come to the conclusion that the compiler doesn't do the

Re: [HACKERS] foreign key locks, 2nd attempt

2011-11-10 Thread Kevin Grittner
Christopher Browne cbbro...@gmail.com wrote: There's value in having an immutability constraint on a column, where, in effect, you're not allowed to modify the value of the column, once assigned. +1 We would definitely use such a feature, should it become available. -Kevin -- Sent via

Re: [HACKERS] foreign key locks, 2nd attempt

2011-11-10 Thread Christopher Browne
On Thu, Nov 10, 2011 at 3:29 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Christopher Browne cbbro...@gmail.com wrote: There's value in having an immutability constraint on a column, where, in effect, you're not allowed to modify the value of the column, once assigned. +1  We would

Re: [HACKERS] proposal: psql concise mode

2011-11-10 Thread Bruce Momjian
Robert Haas wrote: On Sun, Nov 6, 2011 at 3:29 PM, Josh Kupershmidt schmi...@gmail.com wrote: On Sun, Nov 6, 2011 at 1:16 PM, Dickson S. Guedes lis...@guedesoft.net wrote: test=# \d+ foo ? ? ? ? ? ? ? ? ? ? ? ? Table public.foo ?Column | ?Type ? | Storage +-+-

Re: [HACKERS] foreign key locks, 2nd attempt

2011-11-10 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of jue nov 10 16:59:20 -0300 2011: Alvaro Herrera wrote: Hello, After some rather extensive rewriting, I submit the patch to improve foreign key locks. To recap, the point of this patch is to introduce a new lock tuple mode, that lets the RI

Re: [HACKERS] const correctness

2011-11-10 Thread Bruce Momjian
Kevin Grittner wrote: Tom Lane t...@sss.pgh.pa.us wrote: The problem with it of course is that mistaken use could have the effect of casting-away-const, which is exactly what we hoped to prevent. Still, there may not be a better solution. Yeah, I've come to the conclusion that the

Re: [HACKERS] unaccent extension missing some accents

2011-11-10 Thread Bruce Momjian
Tom Lane wrote: J Smith dark.panda+li...@gmail.com writes: I've attached a patch against master for unaccent.c that uses swscanf along with char2wchar and wchar2char instead of sscanf directly to initialize the unaccent extension and it appears to fix the problem in both the master and

Re: [HACKERS] unaccent extension missing some accents

2011-11-10 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Tom Lane wrote: However, the bigger picture is that OS X's UTF8 locales are broken through-and-through, and most of their other problems are not feasible to work around. If Apple's low-level code came from FreeBSD and NetBSD, how did they get so

Re: [HACKERS] Syntax for partitioning

2011-11-10 Thread Dimitri Fontaine
Jeff Janes jeff.ja...@gmail.com writes: shouldn't it need a DBA to declare it? How is the system supposed to anticipate that at some point years in the future I will want to run the command sequence create foo_archive as select from foo where year2009; delete from foo where year2009, or its

Re: [HACKERS] foreign key locks, 2nd attempt

2011-11-10 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of jue nov 10 16:59:20 -0300 2011: Alvaro Herrera wrote: Hello, After some rather extensive rewriting, I submit the patch to improve foreign key locks. To recap, the point of this patch is to introduce a new lock

[HACKERS] LOCK_DEBUG is busted

2011-11-10 Thread Robert Haas
It's possible to compile the source tree with LOCK_DEBUG defined, but the resulting postgres promptly dumps core, due to the fact that user_lockmethod doesn't supply any value for trace_flag; thus, the first LockReleaseAll(USER_LOCKMETHOD) dereferences a NULL pointer. This is the result of the

Re: [HACKERS] type privileges and default privileges

2011-11-10 Thread Robert Haas
On Thu, Nov 10, 2011 at 3:17 PM, Peter Eisentraut pete...@gmx.net wrote: On ons, 2011-11-09 at 00:21 -0500, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Let me put this differently.  Should we either continue to hardcode the default privileges in the acldefault() function, or

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Robert Haas
2011/11/10 Αναστάσιος Αρβανίτης tasosarvani...@yahoo.gr: I'm developing an application that requires parsing of execution plans (those produced as output by issuing an EXPLAIN [query] command). Are you aware of any Java library that I could use for this purpose? I found

Re: [HACKERS] const correctness

2011-11-10 Thread Kevin Grittner
Bruce Momjian br...@momjian.us wrote: I realize the patch only added 1-2 new const functions No, version 2 of the patch used the strchr() technique and has *zero* new functions and *zero* new macros. but this is only a small area of the code being patched --- a full solution would have

Re: [HACKERS] const correctness

2011-11-10 Thread Bruce Momjian
Kevin Grittner wrote: Bruce Momjian br...@momjian.us wrote: I realize the patch only added 1-2 new const functions No, version 2 of the patch used the strchr() technique and has *zero* new functions and *zero* new macros. Right. I was referring to the non-strchr() approach in the

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Andrew Dunstan
On 11/10/2011 04:29 PM, Robert Haas wrote: 2011/11/10 Αναστάσιος Αρβανίτηςtasosarvani...@yahoo.gr: I'm developing an application that requires parsing of execution plans (those produced as output by issuing an EXPLAIN [query] command). Are you aware of any Java library that I could use for

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Bruce Momjian
Tom Lane wrote: Albe Laurenz laurenz.a...@wien.gv.at writes: Tom Lane wrote: A GUC is entirely, completely, 100% the wrong answer. It has no way to deal with the fact that some clients may need compression and others not. You can force a certain SSL cipher on the client, why not a

Re: [HACKERS] const correctness

2011-11-10 Thread Kevin Grittner
Bruce Momjian br...@momjian.us wrote: No, version 2 of the patch used the strchr() technique and has *zero* new functions and *zero* new macros. Right. I was referring to the non-strchr() approach in the initial patch. I'm sorry that I misunderstood you. So, I don't think I've heard

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 11/10/2011 04:29 PM, Robert Haas wrote: 2011/11/10 ÁíáóôÜóéïò Áñâáíßôçòtasosarvani...@yahoo.gr: Is there any other solution I am not aware of? Not that I know of. I think pgAdmin can parse the EXPLAIN output, too, but that's in C++.

Re: [HACKERS] LOCK_DEBUG is busted

2011-11-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: It's possible to compile the source tree with LOCK_DEBUG defined, but the resulting postgres promptly dumps core, due to the fact that user_lockmethod doesn't supply any value for trace_flag; thus, the first LockReleaseAll(USER_LOCKMETHOD) dereferences

Re: [HACKERS] LOCK_DEBUG is busted

2011-11-10 Thread Bruce Momjian
Robert Haas wrote: Now, whether or not this facility is well designed is a worthwhile question. Trace_lock_oidmin seems pretty sketchy to me, especially because it's blindly applied to even to lock tags where the second field isn't a relation - i.e. SET_LOCKTAG_TRANSACTION sets it to zero,

Re: [HACKERS] LOCK_DEBUG is busted

2011-11-10 Thread Bruce Momjian
Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: It's possible to compile the source tree with LOCK_DEBUG defined, but the resulting postgres promptly dumps core, due to the fact that user_lockmethod doesn't supply any value for trace_flag; thus, the first

Re: [HACKERS] type privileges and default privileges

2011-11-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Nov 10, 2011 at 3:17 PM, Peter Eisentraut pete...@gmx.net wrote: No, I'm pondering having pg_default_acl initialized so that newly created types have explicit USAGE privileges in their typacl column, so acldefault() wouldn't be needed. (And

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: How is the compression connection parameter set? It seems odd for it to be compiled into the application because the application could be run on different networks. I don't know of any way to inject connection options from outside the application like

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Greg Smith
On 11/10/2011 11:10 AM, Αναστάσιος Αρβανίτης wrote: I'm developing an application that requires parsing of execution plans (those produced as output by issuing an EXPLAIN [query] command). Are you aware of any Java library that I could use for this purpose? I found

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: How is the compression connection parameter set? It seems odd for it to be compiled into the application because the application could be run on different networks. I don't know of any way to inject connection options from outside

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Andreas Karlsson
On 2011-11-10 17:23, Αναστάσιος Αρβανίτης wrote: Also another option I am considering is to use EXPLAIN [query] FORMAT XML which is available in PostgreSQL 9.1. However, in that case it would better to have the XML Schema of the generated plans available. Is there any other solution I am not

Re: [HACKERS] Disable OpenSSL compression

2011-11-10 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Tom Lane wrote: Huh? You put it in the connection string, typically. This is not different from how you'd specify sslmode to start with. Well, you are saying the client is more flexible, but if the client is a binary, it isn't flexible without an

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Andreas Karlsson
On 2011-11-10 23:42, Andreas Karlsson wrote: Hi, I recommend using the XML, JSON or YAML version of the plan, whichever is easiest in your programming language to parse. I do not think anyone has written a formal schema yet for the XML but it still should be much easier to parse than rolling

Re: [HACKERS] LOCK_DEBUG is busted

2011-11-10 Thread Robert Haas
On Thu, Nov 10, 2011 at 5:07 PM, Bruce Momjian br...@momjian.us wrote: Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: It's possible to compile the source tree with LOCK_DEBUG defined, but the resulting postgres promptly dumps core, due to the fact that user_lockmethod doesn't

Re: [HACKERS] proposal: psql concise mode

2011-11-10 Thread Tom Lane
Josh Kupershmidt schmi...@gmail.com writes: FWIW, I just played around with 7.4 and 7.3 servers. (I had some bad memories of the older tarballs not building, but that must have been only on OS X -- I can build at least back to 7.3 on this Ubuntu 11.04 machine.) Most meta-commands worked

[HACKERS] proposal : backend startup hook / after logon trigger

2011-11-10 Thread Tomas Vondra
Hi, I occasionally need to perform some action whenever a user connects, and there's nothing like an AFTER LOGON trigger (available in some other databases). Is there any particular reason why there's not a backend start hook, executed right after a backend is initialized? I've tried a very

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Andrew Dunstan
On 11/10/2011 04:59 PM, Tom Lane wrote: Andrew Dunstanand...@dunslane.net writes: Pg--Explain is extremely well written, and should be easily translatable to Java if you really need to. The whole thing is less than 2000 lines, and a large part of that is comments. Nonetheless, it's solving

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Andrew Dunstan
On 11/10/2011 05:26 PM, Greg Smith wrote: I know some of the earlier versions of XML EXPLAIN included a DTD option to output that, but I don't see that in the committed code. I'm not sure where that is at actually; it's a good question. The only reference to doing this I found was

Re: [HACKERS] proposal: psql concise mode

2011-11-10 Thread Josh Kupershmidt
On Thu, Nov 10, 2011 at 3:41 PM, Bruce Momjian br...@momjian.us wrote: Have you tried \d+ with this psql mode:        \pset format wrapped It wraps the data so it fits on the screen --- it is my default in my .psqlrc. I think that's one of the many psql features I haven't experimented with,

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 11/10/2011 04:59 PM, Tom Lane wrote: Nonetheless, it's solving the wrong problem. Any program that is being written today to read EXPLAIN output should be written to read one of the machine-readable formats. Umm, it *does* handle all the

Re: [HACKERS] psql expanded auto

2011-11-10 Thread Noah Misch
On Tue, Nov 08, 2011 at 06:36:52AM +0200, Peter Eisentraut wrote: Here is an updated patch that addresses all the issues you pointed out. Looks ready to me. Thanks. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID

2011-11-10 Thread Thom Brown
On 18 July 2011 02:46, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of dom jul 17 20:36:49 -0400 2011: Does git allow for additional commit fields? That would allow for easy tracking without much additional burden on committers. I mean, there's git

Re: [HACKERS] proposal: psql concise mode

2011-11-10 Thread Josh Kupershmidt
On Thu, Nov 10, 2011 at 6:12 PM, Tom Lane t...@sss.pgh.pa.us wrote: As I suggested, many more unexpected failures (e.g. \dnS+) pop up when talking to a 7.3 server. It's not a big deal, but it'd be nice if we could instead error out with a sorry, we're too lazy to try to support 7.3 on the

Re: [HACKERS] [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID

2011-11-10 Thread Thom Brown
On 10 November 2011 23:56, Thom Brown t...@linux.com wrote: On 18 July 2011 02:46, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of dom jul 17 20:36:49 -0400 2011: Does git allow for additional commit fields? That would allow for easy tracking without

Re: [HACKERS] proposal: psql concise mode

2011-11-10 Thread Dickson S. Guedes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10-11-2011 21:42, Josh Kupershmidt wrote: On Thu, Nov 10, 2011 at 3:41 PM, Bruce Momjian br...@momjian.us wrote: Have you tried \d+ with this psql mode: \pset format wrapped It wraps the data so it fits on the screen --- it is my

Re: [HACKERS] LOCK_DEBUG is busted

2011-11-10 Thread Robert Haas
On Thu, Nov 10, 2011 at 5:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: It's possible to compile the source tree with LOCK_DEBUG defined, but the resulting postgres promptly dumps core, due to the fact that user_lockmethod doesn't supply any value for

Re: [HACKERS] proposal : backend startup hook / after logon trigger

2011-11-10 Thread Euler Taveira de Oliveira
On 10-11-2011 21:12, Tomas Vondra wrote: I occasionally need to perform some action whenever a user connects, and there's nothing like an AFTER LOGON trigger (available in some other databases). Are you proposing an on-logon hook or an on-connect trigger? It is two separate things. The former

Re: [HACKERS] LOCK_DEBUG is busted

2011-11-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: ... What I think it's mostly doing at this point is making it more difficult to make further changes - you do whatever you want to do, and then you have to go figure out what to do about the crazy LOCK_DEBUG stuff that no one uses. [ shrug... ] If

Re: [HACKERS] Syntax for partitioning

2011-11-10 Thread Daniel Farina
On Thu, Nov 10, 2011 at 1:19 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Now the aim would be to be able to implement the operation you describe by using the new segment map, which is an index pointing to sequential ranges of on-disk blocks where the data is known to share a common key

Re: [HACKERS] type privileges and default privileges

2011-11-10 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Nov 10, 2011 at 3:17 PM, Peter Eisentraut pete...@gmx.net wrote: No, I'm pondering having pg_default_acl initialized so that newly created types have explicit USAGE privileges in their typacl column, so

Re: [HACKERS] [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID

2011-11-10 Thread Alvaro Herrera
Excerpts from Thom Brown's message of jue nov 10 21:28:06 -0300 2011: On 10 November 2011 23:56, Thom Brown t...@linux.com wrote: The dump correctly contains: CREATE TABLE a (    num integer,    CONSTRAINT meow CHECK ((num 20)) NOT VALID ); Actually I mean incorrectly

Re: [HACKERS] type privileges and default privileges

2011-11-10 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Tom Lane (t...@sss.pgh.pa.us) wrote: To actually get rid of acldefault, we'd have to do that not only for types but for all objects with ACLs. That's a LOT of catalog bulk, and like Robert I'm not seeing much benefit. It's not unreasonable to want

Re: [HACKERS] type privileges and default privileges

2011-11-10 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@snowman.net writes: A LOT of catalog bulk..? Am I missing something here? What I'm missing is what actual benefit we get from spending the extra space. (No, I don't believe that changing the defaults is something that users

Re: [HACKERS] type privileges and default privileges

2011-11-10 Thread Robert Haas
On Thu, Nov 10, 2011 at 10:52 PM, Stephen Frost sfr...@snowman.net wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@snowman.net writes: A LOT of catalog bulk..?  Am I missing something here? What I'm missing is what actual benefit we get from spending the extra space.  

Re: [HACKERS] Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers

2011-11-10 Thread Daniel Farina
On Wed, Nov 9, 2011 at 1:56 AM, Nikhil Sontakke nikkh...@gmail.com wrote: Hi, Consider the following sequence of events: s1 # CREATE SCHEMA test_schema; s1 # CREATE TABLE test_schema.c1(x int); Now open another session s2 and via gdb issue a breakpoint on heap_create_with_catalog() which

Re: [HACKERS] type privileges and default privileges

2011-11-10 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Thu, Nov 10, 2011 at 10:52 PM, Stephen Frost sfr...@snowman.net wrote: Certainly a big one that people get caught by is our default of execute to public on functions..  Most of our privileges are set up as minimal access to others, functions

[HACKERS] Multiple Extensions

2011-11-10 Thread David E. Wheeler
Hackers, I’m preparing a new release of pgTAP, and have started breaking it down into smaller extensions. I’ve been planning to have them all in one distribution file for now, but it seems that one cannot specify multiple extension names in the EXTENSION variable. In my Makefile, I have

  1   2   >