Re: [HACKERS] Transaction-scope advisory locks

2011-02-10 Thread Itagaki Takahiro
On Thu, Feb 10, 2011 at 08:36, Marko Tiikkaja marko.tiikk...@cs.helsinki.fi wrote: One issue might be in pg_locks Robert suggested not doing this for 9.1, and I don't have anything against that. Agreed. Updated patch attached. Looks good to commit. I note a few minor issues for committer:

Re: [HACKERS] Varchar and binary protocol

2011-02-10 Thread Merlin Moncure
On Thu, Feb 10, 2011 at 2:56 AM, Radosław Smogura rsmog...@softperience.eu wrote: Merlin Moncure mmonc...@gmail.com Thursday 10 February 2011 08:48:26 On Sat, Feb 5, 2011 at 4:59 PM, Radosław Smogura Since there is basically zero difference in how *varchar* is handled in the database for the

Re: [HACKERS] patches that could use additional reviewers

2011-02-10 Thread Noah Misch
[Cc: trimmed] On Wed, Feb 09, 2011 at 01:45:11PM -0500, Robert Haas wrote: A few other ones that could use more reviewers include: key locks I'll take a look at this one. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

[HACKERS] Re: [COMMITTERS] pgsql: Update docs on building for Windows to accomodate current realit

2011-02-10 Thread Andrew Dunstan
On 02/10/2011 01:04 AM, Gurjeet Singh wrote: This commit refers to www.mingw64.org http://www.mingw64.org which does not exist. Oops. URL (and name) fixed. thanks. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Add support for logging the current role

2011-02-10 Thread Itagaki Takahiro
On Mon, Feb 7, 2011 at 04:10, Stephen Frost sfr...@snowman.net wrote: Yeah, doesn't seem to work for me (missing '/bin/collateindex.pl', apparently..). You might need yum install openjade stylesheets or similar packages and re-configure. Ok, I've cleaned up that part of the documentation to

Re: [HACKERS] Range Types - efficiency

2011-02-10 Thread Florian Weimer
* Chris Browne: The RangeType-based equivalent is the following: rangetest@localhost- explain analyze select * from some_data where '[2010-01-01,2010-02-01)'::daterange @ whensit; QUERY PLAN

Re: [HACKERS] SSI patch version 14

2011-02-10 Thread Heikki Linnakangas
On 09.02.2011 17:58, Kevin Grittner wrote: Dan Portsd...@csail.mit.edu wrote: I think for SerializableXidHash we should probably just initially allocate it at its maximum size. Then it'll match the PredXact list which is allocated in full upfront, and there's no risk of being able to allocate

Re: [HACKERS] pl/python explicit subtransactions

2011-02-10 Thread Jan Urbański
On 10/02/11 01:26, Steve Singer wrote: On 11-02-09 05:22 PM, Peter Eisentraut wrote: On tis, 2011-02-08 at 00:32 -0500, Steve Singer wrote: Is it necessarily a good idea that an explicit subtransaction disables the implicit sub-subtransactions? It might be conceivable that you'd still want

Re: [HACKERS] SSI patch version 14

2011-02-10 Thread Andrew Dunstan
On 02/10/2011 05:09 AM, Heikki Linnakangas wrote: On 09.02.2011 17:58, Kevin Grittner wrote: Dan Portsd...@csail.mit.edu wrote: I think for SerializableXidHash we should probably just initially allocate it at its maximum size. Then it'll match the PredXact list which is allocated in full

[HACKERS] psql patch: tab-complete :variables also at buffer start

2011-02-10 Thread Christoph Berg
Currently, tab-completing :variable names in psql does not work at the beginning of the line. Fix this by moving the code block before the empty buffer case. (I have several sql macros in my .psqlrc like :relsize that prints table sizes in a nicely formatted way, being able to type :tab would be

Re: [HACKERS] Re: [COMMITTERS] pgsql: Update docs on building for Windows to accomodate current realit

2011-02-10 Thread Magnus Hagander
On Thu, Feb 10, 2011 at 07:04, Gurjeet Singh singh.gurj...@gmail.com wrote: This commit refers to www.mingw64.org which does not exist. Andrew fixed this alreayd. Also, clicking on the gitweb link below (from GMail), opens the browser window with an address where ';' are replaced with %3B ,

Re: [HACKERS] [COMMITTERS] pgsql: Remove more SGML tabs.

2011-02-10 Thread Peter Eisentraut
On ons, 2011-02-09 at 08:00 -0800, David Fetter wrote: On Wed, Feb 09, 2011 at 01:17:06PM +, Bruce Momjian wrote: Remove more SGML tabs. Perhaps we should see about putting something in .git/hooks/pre-commit so people can focus on more substantive matters. Is there some kind of

Re: [HACKERS] Move WAL warning

2011-02-10 Thread Magnus Hagander
On Thu, Feb 10, 2011 at 03:20, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Feb 9, 2011 at 7:02 PM, Magnus Hagander mag...@hagander.net wrote: On Thu, Feb 3, 2011 at 11:19, Magnus Hagander mag...@hagander.net wrote: On Wed, Feb 2, 2011 at 18:00, Magnus Hagander mag...@hagander.net wrote:

Re: [HACKERS] Add support for logging the current role

2011-02-10 Thread Noah Misch
On Thu, Feb 10, 2011 at 06:56:15PM +0900, Itagaki Takahiro wrote: On Mon, Feb 7, 2011 at 04:10, Stephen Frost sfr...@snowman.net wrote: I agree that it's logically good design, but we could not accept it as long as it breaks tools in the real world... If it does, I think it's pretty clear

[HACKERS] xlog functions for pg_basebackup

2011-02-10 Thread Magnus Hagander
In cleaning up the streaming part of pg_basebackup, I came across this gem I copied from elsewherE: /* * We have to use postgres.h not postgres_fe.h here, because there's so much * backend-only stuff in the XLOG include files we need. But we need a * frontend-ish environment otherwise. Hence

Re: [HACKERS] Add support for logging the current role

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 6:27 AM, Noah Misch n...@leadboat.com wrote: FWIW, a 330 byte boot_val doesn't seem like a big deal to me.  If it were over _POSIX2_LINE_MAX (2048), that might be another matter. I don't think it's entirely stupid to worry about this completely screwing up the output of

Re: [HACKERS] PostgreSQL FDW update

2011-02-10 Thread Robert Haas
On Tue, Feb 8, 2011 at 3:52 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: I needed something to test the FDW API patch with, and didn't want to get involved in the COPY API changes, and also wanted to have something that needs real connection management and can push down

Re: [HACKERS] psql patch: tab-complete :variables also at buffer start

2011-02-10 Thread Itagaki Takahiro
On Thu, Feb 10, 2011 at 19:37, Christoph Berg c...@df7cb.de wrote: Currently, tab-completing :variable names in psql does not work at the beginning of the line. Fix this by moving the code block before the empty buffer case. Seems reasonable to me. -- Itagaki Takahiro -- Sent via

Re: [HACKERS] arrays as pl/perl input arguments [PATCH]

2011-02-10 Thread Alexey Klyukin
On Feb 9, 2011, at 9:28 PM, Alex Hunsaker wrote: On Wed, Feb 9, 2011 at 08:24, Alexey Klyukin al...@commandprompt.com wrote: What was actually broken in encode_array_literal support of composite types (it converted perl hashes to the literal composite-type constants, expanding nested

Re: [HACKERS] Re: [COMMITTERS] pgsql: Update docs on building for Windows to accomodate current realit

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 5:46 AM, Magnus Hagander mag...@hagander.net wrote: On Thu, Feb 10, 2011 at 07:04, Gurjeet Singh singh.gurj...@gmail.com wrote: This commit refers to www.mingw64.org which does not exist. Andrew fixed this alreayd. Also, clicking on the gitweb link below (from GMail),

Re: [HACKERS] Re: [COMMITTERS] pgsql: Update docs on building for Windows to accomodate current realit

2011-02-10 Thread Magnus Hagander
On Thu, Feb 10, 2011 at 14:22, Robert Haas robertmh...@gmail.com wrote: On Thu, Feb 10, 2011 at 5:46 AM, Magnus Hagander mag...@hagander.net wrote: On Thu, Feb 10, 2011 at 07:04, Gurjeet Singh singh.gurj...@gmail.com wrote: This commit refers to www.mingw64.org which does not exist. Andrew

Re: [HACKERS] keeping a timestamp of the last stats reset (for a db, table and function)

2011-02-10 Thread Magnus Hagander
On Sun, Feb 6, 2011 at 08:17, Greg Smith g...@2ndquadrant.com wrote: Tomas Vondra wrote: Because when I create a database, the field is NULL - that's true. But once I connect to the database, the stats are updated and the field is set (thanks to the logic in pgstat.c). OK--so it does what

Re: [HACKERS] Re: [COMMITTERS] pgsql: Update docs on building for Windows to accomodate current realit

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 8:38 AM, Magnus Hagander mag...@hagander.net wrote: On Thu, Feb 10, 2011 at 14:22, Robert Haas robertmh...@gmail.com wrote: On Thu, Feb 10, 2011 at 5:46 AM, Magnus Hagander mag...@hagander.net wrote: On Thu, Feb 10, 2011 at 07:04, Gurjeet Singh singh.gurj...@gmail.com

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-02-10 Thread Magnus Hagander
On Tue, Feb 8, 2011 at 05:24, Robert Haas robertmh...@gmail.com wrote: On Wed, Jan 19, 2011 at 1:01 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Jan 13, 2011 at 9:08 PM, Fujii Masao masao.fu...@gmail.com wrote: I did s/failover/promote. Here is the updated patch. I rebased the patch

Re: [HACKERS] [COMMITTERS] pgsql: Remove more SGML tabs.

2011-02-10 Thread Alvaro Herrera
Excerpts from Peter Eisentraut's message of jue feb 10 07:58:16 -0300 2011: One thing I was thinking of was that we could add a global make maintainer-check target (a name I picked up from other projects) which would run various source code sanity checks. Besides the SGML tabs issue, my

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-02-10 Thread Magnus Hagander
On Thu, Feb 10, 2011 at 15:25, Magnus Hagander mag...@hagander.net wrote: On Tue, Feb 8, 2011 at 05:24, Robert Haas robertmh...@gmail.com wrote: On Wed, Jan 19, 2011 at 1:01 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Jan 13, 2011 at 9:08 PM, Fujii Masao masao.fu...@gmail.com wrote: I

Re: [HACKERS] Range Types (catversion.h)

2011-02-10 Thread Erik Rijkers
On Wed, February 9, 2011 09:35, Jeff Davis wrote: Updated patch. Thanks! I just wanted to mention that this latest patch doesn't quite apply as-is, because of catversion changes. I've removed the change to catversion.h (18 lines, starting at 4985) from the patch file; then it applies

Re: [HACKERS] postponing some large patches to 9.2

2011-02-10 Thread Robert Haas
On Tue, Feb 8, 2011 at 7:58 PM, Jeff Davis pg...@j-davis.com wrote: On the flip side, if we don't provide review to WIP patches during the 3rd commitfest, how do we expect to get anything close to committable on the 1st commitfest of the next cycle? I'm not sure exactly what you're going for

Re: [HACKERS] log_hostname and pg_stat_activity

2011-02-10 Thread Robert Haas
On Tue, Feb 1, 2011 at 1:33 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Feb 1, 2011 at 1:09 PM, Peter Eisentraut pete...@gmx.net wrote: On tis, 2011-01-18 at 19:24 -0500, Steve Singer wrote: However if I connect with a line in pg_hba that matches on an IP network then my

Re: [HACKERS] patches that could use additional reviewers

2011-02-10 Thread Robert Haas
On Wed, Feb 9, 2011 at 1:45 PM, Robert Haas robertmh...@gmail.com wrote: A few other ones that could use more reviewers include: I've just corrected the status of a few patches in the CommitFest application. In particular, I set the following back to Needs Review. SQL/MED - postgresql_fdw

Re: [HACKERS] pg_dump directory archive format / parallel pg_dump

2011-02-10 Thread Robert Haas
On Tue, Feb 8, 2011 at 10:54 PM, Joachim Wieland j...@mcknight.de wrote: On Tue, Feb 8, 2011 at 8:31 PM, Itagaki Takahiro itagaki.takah...@gmail.com wrote: On Tue, Feb 8, 2011 at 13:34, Robert Haas robertmh...@gmail.com wrote: So how close are we to having a committable version of this?  

Re: [HACKERS] log_hostname and pg_stat_activity

2011-02-10 Thread Steve Singer
On 11-02-10 10:13 AM, Robert Haas wrote: On Tue, Feb 1, 2011 at 1:33 PM, Robert Haasrobertmh...@gmail.com wrote: On Tue, Feb 1, 2011 at 1:09 PM, Peter Eisentrautpete...@gmx.net wrote: On tis, 2011-01-18 at 19:24 -0500, Steve Singer wrote: However if I connect with a line in pg_hba that

[HACKERS] Adding new variables into GUC

2011-02-10 Thread Θάνος Παπαπέτρου
Hi, I am an MSc student in the department of Informatics and Telecommunications of the University of Athens and as part of my thesis I am examining a new path/plan cost model for DB optimizers. I have successfully changed the optimizer of PostgreSQL in order to implement this model, but

Re: [HACKERS] log_hostname and pg_stat_activity

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 10:22 AM, Steve Singer ssinger...@sympatico.ca wrote: On 11-02-10 10:13 AM, Robert Haas wrote: On Tue, Feb 1, 2011 at 1:33 PM, Robert Haasrobertmh...@gmail.com  wrote: On Tue, Feb 1, 2011 at 1:09 PM, Peter Eisentrautpete...@gmx.net  wrote: On tis, 2011-01-18 at 19:24

Re: [HACKERS] log_hostname and pg_stat_activity

2011-02-10 Thread Steve Singer
On 11-02-10 10:32 AM, Robert Haas wrote: I was assuming those changes were sufficiently trivial that they could be made at commit-time, especially if Peter is committing it himself. Of course if he'd like a re-review, he can always post an updated patch, but I just thought that was overly

Re: [HACKERS] Extensions versus pg_upgrade

2011-02-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Feb 8, 2011 at 9:48 PM, Tom Lane t...@sss.pgh.pa.us wrote: In contrast, ALTER EXTENSION ADD doesn't presuppose that you couldn't add the object to multiple extensions; and it has a natural inverse, ALTER EXTENSION DROP.  I am not necessarily

Re: [HACKERS] Extensions versus pg_upgrade

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 10:41 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Feb 8, 2011 at 9:48 PM, Tom Lane t...@sss.pgh.pa.us wrote: In contrast, ALTER EXTENSION ADD doesn't presuppose that you couldn't add the object to multiple extensions; and it

Re: [HACKERS] Extensions versus pg_upgrade

2011-02-10 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: Actually, it occurs to me that the need for ALTER EXTENSION DROP could be upon us sooner than we think. The cases where an extension upgrade script would need that are (1) you want to remove some deprecated piece of the extension's API; (2) you want to

Re: [HACKERS] Extensions versus pg_upgrade

2011-02-10 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Tom Lane t...@sss.pgh.pa.us writes: Actually, it occurs to me that the need for ALTER EXTENSION DROP could be upon us sooner than we think. The cases where an extension upgrade script would need that are (1) you want to remove some deprecated

Re: [HACKERS] Adding new variables into GUC

2011-02-10 Thread Tom Lane
=?ISO-8859-7?B?yNzt7/Ig0OHw4fDd9PHv9Q==?= tha...@di.uoa.gr writes: I am an MSc student in the department of Informatics and Telecommunications of the University of Athens and as part of my thesis I am examining a new path/plan cost model for DB optimizers. I have successfully changed the

Re: [HACKERS] Extensions versus pg_upgrade

2011-02-10 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: That would be rejected because you're not allowed to drop an individual member object of an extension. (And no, I don't want to have a kluge in dependency.c that makes that test work differently when creating_extension.) Fair enough, all the more as soon

Re: [HACKERS] Range Types (catversion.h)

2011-02-10 Thread Tom Lane
Erik Rijkers e...@xs4all.nl writes: On Wed, February 9, 2011 09:35, Jeff Davis wrote: Updated patch. I just wanted to mention that this latest patch doesn't quite apply as-is, because of catversion changes. Just a note: standard practice is for submitted patches to *not* touch catversion.h.

Re: [HACKERS] Range Types (catversion.h)

2011-02-10 Thread Jeff Davis
On Thu, 2011-02-10 at 12:04 -0500, Tom Lane wrote: Erik Rijkers e...@xs4all.nl writes: On Wed, February 9, 2011 09:35, Jeff Davis wrote: Updated patch. I just wanted to mention that this latest patch doesn't quite apply as-is, because of catversion changes. Just a note: standard

Re: [HACKERS] Range Types (catversion.h)

2011-02-10 Thread Peter Eisentraut
On tor, 2011-02-10 at 09:28 -0800, Jeff Davis wrote: I originally put it there so that I wouldn't mix up data directories with a patch I'm reviewing, but I agree that it seems easier this way. FWIW, I disagree with Tom and do recommend putting the catversion change in the patch. -- Sent via

Re: [HACKERS] Range Type constructors

2011-02-10 Thread Robert Haas
On Wed, Feb 9, 2011 at 2:09 AM, Jeff Davis pg...@j-davis.com wrote: That's how arrays do it: there's a special Expr node that represents an array expression. Maybe the same thing could be used for range types, but I fear that there may be some grammar conflicts. I doubt we'd want to fully

Re: [HACKERS] Range Types (catversion.h)

2011-02-10 Thread Jeff Davis
On Thu, 2011-02-10 at 15:38 +0100, Erik Rijkers wrote: I've removed the change to catversion.h (18 lines, starting at 4985) from the patch file; then it applies cleanly. I should mention that the last patch changed the representation to be more compact. So, if you have any existing test data

Re: [HACKERS] Range Types (catversion.h)

2011-02-10 Thread Heikki Linnakangas
On 10.02.2011 20:01, Peter Eisentraut wrote: On tor, 2011-02-10 at 09:28 -0800, Jeff Davis wrote: I originally put it there so that I wouldn't mix up data directories with a patch I'm reviewing, but I agree that it seems easier this way. FWIW, I disagree with Tom and do recommend putting the

Re: [HACKERS] postponing some large patches to 9.2

2011-02-10 Thread Jeff Davis
On Thu, 2011-02-10 at 09:46 -0500, Robert Haas wrote: On Tue, Feb 8, 2011 at 7:58 PM, Jeff Davis pg...@j-davis.com wrote: On the flip side, if we don't provide review to WIP patches during the 3rd commitfest, how do we expect to get anything close to committable on the 1st commitfest of the

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Tom Lane
I spent some time reviewing this thread. I think the major point that's not received adequate discussion is this: the design assumes that there's just one current version of any extension, and that's not good enough. David Fetter was trying to make that point upthread but didn't seem to convince

Re: [HACKERS] Range Types (catversion.h)

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 1:23 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 10.02.2011 20:01, Peter Eisentraut wrote: On tor, 2011-02-10 at 09:28 -0800, Jeff Davis wrote: I originally put it there so that I wouldn't mix up data directories with a patch I'm reviewing,

Re: [HACKERS] [COMMITTERS] pgsql: Remove more SGML tabs.

2011-02-10 Thread David Fetter
On Thu, Feb 10, 2011 at 12:58:16PM +0200, Peter Eisentraut wrote: On ons, 2011-02-09 at 08:00 -0800, David Fetter wrote: On Wed, Feb 09, 2011 at 01:17:06PM +, Bruce Momjian wrote: Remove more SGML tabs. Perhaps we should see about putting something in .git/hooks/pre-commit so

Re: [HACKERS] Range Type constructors

2011-02-10 Thread Jeff Davis
On Thu, 2011-02-10 at 13:07 -0500, Robert Haas wrote: According to our documentation[1], RANGE is reserved in SQL:2008 and SQL:2003, which makes it more imaginable to reserve it than it would be otherwise. Oh, interesting. I believe that in a previous email you mentioned that you were

Re: [HACKERS] Range Type constructors

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 1:41 PM, Jeff Davis pg...@j-davis.com wrote: This might solve the constructor problem nicely if we could do things like:  RANGE[10,20) But I have a feeling that will either cause a bizarre problem with the grammar, or someone will think it's not very SQL-like. I think

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread David E. Wheeler
On Feb 10, 2011, at 10:26 AM, Tom Lane wrote: 1. Choose the newest available version. 2. Let the control file specify which version is the default. I think I prefer #2 because it avoids needing a rule for comparing version identifiers, and it caters to the possibility that the

Re: [HACKERS] Adding new variables into GUC

2011-02-10 Thread Josh Berkus
You basically need the variable, the entry in the appropriate array in guc.c, and some documentation (at least if you'd like anyone else to ever use the code). Try looking at some past patches that added GUCs similar to yours. For completeness, it would also be good to add rows to the

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 1:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: requires, relocatable and schema: These are problematic, because it's not out of the question that someone might want to change these properties from one version to another.  But as things are currently set up, we must know

Re: [HACKERS] Adding new variables into GUC

2011-02-10 Thread Robert Haas
2011/2/10 Josh Berkus j...@agliodbs.com: You basically need the variable, the entry in the appropriate array in guc.c, and some documentation (at least if you'd like anyone else to ever use the code).  Try looking at some past patches that added GUCs similar to yours. For completeness, it

Re: [HACKERS] Sync Rep for 2011CF1

2011-02-10 Thread Heikki Linnakangas
On 08.02.2011 20:53, Robert Haas wrote: That having been said, there is at least one part of this patch which looks to be in pretty good shape and seems independently useful regardless of what happens to the rest of it, and that is the code that sends replies from the standby back to the

Re: [HACKERS] Range Type constructors

2011-02-10 Thread Florian Pflug
This might solve the constructor problem nicely if we could do things like: RANGE[10,20) But I have a feeling that will either cause a bizarre problem with the grammar, or someone will think it's not very SQL-like. It will certainly mess up syntax highlighting and matching bracket

Re: [HACKERS] [COMMITTERS] pgsql: Remove more SGML tabs.

2011-02-10 Thread Peter Eisentraut
On tor, 2011-02-10 at 10:40 -0800, David Fetter wrote: I think all such checks belong in .git/hooks/pre-commit, and need to be as cross-platform as needed for committers. Would a *n*x-based version do for a start? I think as a matter of principle, the only things that belongs into git hooks

Re: [HACKERS] Range Type constructors

2011-02-10 Thread Tom Lane
Florian Pflug f...@phlo.org writes: This might solve the constructor problem nicely if we could do things like: RANGE[10,20) But I have a feeling that will either cause a bizarre problem with the grammar, or someone will think it's not very SQL-like. It will certainly mess up syntax

Re: [HACKERS] pl/python custom exceptions for SPI

2011-02-10 Thread Peter Eisentraut
On sön, 2011-02-06 at 20:44 +0100, Jan Urbański wrote: On 27/01/11 23:24, Jan Urbański wrote: On 11/01/11 12:20, Jan Urbański wrote: On 11/01/11 01:27, Tom Lane wrote: Hannu Krosing ha...@2ndquadrant.com writes: On 10.1.2011 17:20, Jan Urbański wrote: I changed that patch to use Perl

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Tom Lane
David E. Wheeler da...@kineticode.com writes: +1. I assume there will be some way to build versioned shared object libraries too, then? I'm not really addressing that in this proposal. You could imagine supporting all the extension versions in one .so, or you could have one per version

Re: [HACKERS] Adding new variables into GUC

2011-02-10 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: You basically need the variable, the entry in the appropriate array in guc.c, and some documentation (at least if you'd like anyone else to ever use the code). Try looking at some past patches that added GUCs similar to yours. For completeness, it would

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread David E. Wheeler
On Feb 10, 2011, at 11:31 AM, Tom Lane wrote: I'm not really addressing that in this proposal. You could imagine supporting all the extension versions in one .so, or you could have one per version (meaning the upgrade scripts would have to CREATE OR REPLACE all the C functions to re-point

Re: [HACKERS] Range Type constructors

2011-02-10 Thread David E. Wheeler
On Feb 10, 2011, at 10:41 AM, Jeff Davis wrote: This might solve the constructor problem nicely if we could do things like: RANGE[10,20) But I have a feeling that will either cause a bizarre problem with the grammar, or someone will think it's not very SQL-like. I like it a lot better than

Re: [HACKERS] arrays as pl/perl input arguments [PATCH]

2011-02-10 Thread Andrew Dunstan
On 02/10/2011 08:15 AM, Alexey Klyukin wrote: On Feb 9, 2011, at 9:28 PM, Alex Hunsaker wrote: On Wed, Feb 9, 2011 at 08:24, Alexey Klyukinal...@commandprompt.com wrote: What was actually broken in encode_array_literal support of composite types (it converted perl hashes to the literal

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Feb 10, 2011 at 1:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: requires, relocatable and schema: These are problematic, because it's not out of the question that someone might want to change these properties from one version to another.  But as

Re: [HACKERS] Range Type constructors

2011-02-10 Thread David E. Wheeler
On Feb 10, 2011, at 11:21 AM, Tom Lane wrote: It will certainly mess up syntax highlighting and matching bracket detection in pretty much all text editors... Yeah. It's a cute-looking notation but surely it will cause many more problems than it's worth. I agree with Robert's suggestion of

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Tom Lane
David E. Wheeler da...@kineticode.com writes: On Feb 10, 2011, at 11:31 AM, Tom Lane wrote: I don't see how that affects my point? You can spell 1.0 as 0.1 and 1.1 as 0.2 if you like that kind of numbering, but I don't see that that has any real impact. At the end of the day an author is

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 2:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: General opinion around Red Hat is relocatable RPMs don't work.  But pushing a set of functions from one schema to another is a very much narrower problem than what an RPM has to deal with, so I'm not convinced that the analogy

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 3:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: David E. Wheeler da...@kineticode.com writes: On Feb 10, 2011, at 11:31 AM, Tom Lane wrote: I don't see how that affects my point?  You can spell 1.0 as 0.1 and 1.1 as 0.2 if you like that kind of numbering, but I don't see

Re: [HACKERS] pl/python custom exceptions for SPI

2011-02-10 Thread Jan Urbański
On 10/02/11 20:24, Peter Eisentraut wrote: On sön, 2011-02-06 at 20:44 +0100, Jan Urbański wrote: On 27/01/11 23:24, Jan Urbański wrote: On 11/01/11 12:20, Jan Urbański wrote: On 11/01/11 01:27, Tom Lane wrote: Hannu Krosing ha...@2ndquadrant.com writes: On 10.1.2011 17:20, Jan Urbański

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: Now, if you want to argue that moving an extension after the fact (ALTER EXTENSION SET SCHEMA) is so dangerous as to be useless, I wouldn't argue very hard.  Do you want to propose ripping that out?  But relocating at first install doesn't seem

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 3:33 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: Now, if you want to argue that moving an extension after the fact (ALTER EXTENSION SET SCHEMA) is so dangerous as to be useless, I wouldn't argue very hard.  Do you want to

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread David E. Wheeler
On Feb 10, 2011, at 12:02 PM, Tom Lane wrote: Oh, I see, you're just saying that it's not unlikely somebody could find himself with dozens of minor releases all being supported. Yeah, he'd then really need to provide shortcut upgrade scripts, and building/maintaining those would be a pain.

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread David E. Wheeler
On Feb 10, 2011, at 12:07 PM, Robert Haas wrote: You don't need them to be sortable. You just need them to be comparable, and equality seems like a plenty good enough comparison rule. You can compute the shortest chain of upgrade scripts that can take you from the current version to the

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Feb 10, 2011 at 2:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: Now, if you want to argue that moving an extension after the fact (ALTER EXTENSION SET SCHEMA) is so dangerous as to be useless, I wouldn't argue very hard.  Do you want to propose

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 3:46 PM, David E. Wheeler da...@kineticode.com wrote: On Feb 10, 2011, at 12:07 PM, Robert Haas wrote: You don't need them to be sortable.  You just need them to be comparable, and equality seems like a plenty good enough comparison rule.  You can compute the shortest

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Feb 10, 2011 at 3:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: The design as I sketched it didn't need to make any assumptions at all about the meaning of the version identifiers.  But if you were willing to assume that the identifiers are

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Dimitri Fontaine
Hi, Tom Lane t...@sss.pgh.pa.us writes: I spent some time reviewing this thread. I think the major point that's Thanks for doing that, we badly needed someone without an horse in this race to do that and finish the design. So I believe that it'd be a good idea if it were possible for an

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: No, you have to get *those other module authors* to make *their* extensions not relocatable so that you can depend on them. Just tell me exactly in which world an extension's author is setting up the dependencies in the 'required' property and yet fails

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 3:58 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Feb 10, 2011 at 3:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: The design as I sketched it didn't need to make any assumptions at all about the meaning of the version identifiers.

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: I don't think it's appropriate to hold extensions to a higher standard than we do loose objects --- especially when it takes superuser privileges to break things by moving an extension but not to break them by moving loose objects. FWIW, +1. Regards, --

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 4:14 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: No, you have to get *those other module authors* to make *their* extensions not relocatable so that you can depend on them. Just tell me exactly in which world an

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Feb 10, 2011 at 3:58 PM, Tom Lane t...@sss.pgh.pa.us wrote: Hmm.  The problem with that is that once there are large numbers of intermediate versions, the number of potential paths grows exponentially. It's certainly not exponential i.e.

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Robert Haas
On Thu, Feb 10, 2011 at 3:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: The real issue is what happens when you want to install extension A, which depends on extensions B, C, and D, and B, C, and D are all in non-standard locations.  Does that have any chance of working under the system we're

Re: [HACKERS] Revised patches to add table function support to PL/Tcl (TODO item)

2011-02-10 Thread Andrew Dunstan
On 02/08/2011 08:37 PM, Andrew Dunstan wrote: On 02/07/2011 11:30 PM, Robert Haas wrote: On Tue, Dec 28, 2010 at 9:23 PM, Karl Lehenbauer karllehenba...@gmail.com wrote: On Dec 28, 2010, at 7:29 PM, Tom Lane wrote: This patch appears to be changing a whole lot of stuff that in fact

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread David E. Wheeler
On Feb 10, 2011, at 1:22 PM, Tom Lane wrote: Well, okay, let's go with that plan then. If we don't need to assume anything more than equality of version names being meaningful, I think chaining update scripts automatically should solve most of the complaints here. People who really want to

Re: [HACKERS] pl/python custom exceptions for SPI

2011-02-10 Thread Steve Singer
On 11-02-10 03:13 PM, Jan Urbański wrote: On 10/02/11 20:24, Peter Eisentraut wrote: Here is the rest of my review. Submission Review --- Patch applies cleanly. Documentation is still outstanding but Jan has promised it soon. Usability Review --- We don't

Re: [HACKERS] arrays as pl/perl input arguments [PATCH]

2011-02-10 Thread Alexey Klyukin
On Feb 10, 2011, at 9:44 PM, Andrew Dunstan wrote: On 02/10/2011 08:15 AM, Alexey Klyukin wrote: On Feb 9, 2011, at 9:28 PM, Alex Hunsaker wrote: On Wed, Feb 9, 2011 at 08:24, Alexey Klyukinal...@commandprompt.com wrote: What was actually broken in encode_array_literal support of

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: Well, the difference is that loose objects are just on my system, whereas extensions are supposed to work on anybody's system. I'm not clear that it's possible to write an extension that depends on a relocatable extension in a sensible way. If it is,

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Dimitri Fontaine
David E. Wheeler da...@kineticode.com writes: Yes, I think that this is a great solution. I only have to create on upgrade script for each release, and I don't have to worry about concatenating anything or be required to change my versioning algorithm. You still have to make sure that the C

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Feb 10, 2011 at 3:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Again, it's not really any different from the case where the dependent objects are loose rather than members of an extension. Well, the difference is that loose objects are just on my

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread David E. Wheeler
On Feb 10, 2011, at 1:38 PM, Tom Lane wrote: I don't deny that there are risks here. But I think the value of being able to move an extension when it is safe outweighs the difficulty that sometimes it isn't safe. I think we can leave making it safer as a topic for future investigation.

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Aidan Van Dyk
On Thu, Feb 10, 2011 at 9:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: Well, the difference is that loose objects are just on my system, whereas extensions are supposed to work on anybody's system.  I'm not clear that it's possible to write an extension that depends on a relocatable extension in

Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

2011-02-10 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: David E. Wheeler da...@kineticode.com writes: Yes, I think that this is a great solution. I only have to create on upgrade script for each release, and I don't have to worry about concatenating anything or be required to change my versioning

Re: [HACKERS] [COMMITTERS] pgsql: Remove more SGML tabs.

2011-02-10 Thread David Fetter
On Thu, Feb 10, 2011 at 09:16:09PM +0200, Peter Eisentraut wrote: On tor, 2011-02-10 at 10:40 -0800, David Fetter wrote: I think all such checks belong in .git/hooks/pre-commit, and need to be as cross-platform as needed for committers. Would a *n*x-based version do for a start? I think

Re: [HACKERS] [COMMITTERS] pgsql: Remove more SGML tabs.

2011-02-10 Thread David Fetter
On Thu, Feb 10, 2011 at 11:29:43AM -0300, Alvaro Herrera wrote: Excerpts from Peter Eisentraut's message of jue feb 10 07:58:16 -0300 2011: One thing I was thinking of was that we could add a global make maintainer-check target (a name I picked up from other projects) which would run

Re: [HACKERS] SPI_exec doesn't return proc context (on 9.1)

2011-02-10 Thread Alvaro Herrera
Excerpts from Pavel Stehule's message of sáb ene 29 16:56:40 -0300 2011: 2011/1/29 Tom Lane t...@sss.pgh.pa.us: The less crocky way to do that is to use SPI_palloc() for something that should be allocated in the outer context. I understand. Is there some way, where I can use a

  1   2   >