Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-12-12 Thread Shigeru Hanada
(2011/12/09 21:16), Etsuro Fujita wrote: I updated the patch. Please find attached a patch. I've examined v5 patch, and got reasonable EXPLAIN results which reflect collected statistics! As increasing STATISTICS option, estimated rows become better. Please see attached stats_*.txt for what I

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-12-12 Thread Mark Cave-Ayland
On -10/01/37 20:59, Andrew Dunstan wrote: This is apparently an optimization bug in the compiler. If I turn optimization off (CFLAGS=-O0) it goes away. Ick. So at the moment I'm a bit blocked. I can't really file a bug because the compiler can't currently be used to build postgres, I don't

Re: [HACKERS] [REVIEW] pg_last_xact_insert_timestamp

2011-12-12 Thread Simon Riggs
On Sat, Dec 10, 2011 at 12:29 PM, Greg Smith g...@2ndquadrant.com wrote: We can send regular special messages from WALSender to WALReceiver that do not form part of the WAL stream, so we don't bulk up WAL archives. (i.e. don't use w messages). Here's my understanding of how this would work.

Re: [HACKERS] [REVIEW] Patch for cursor calling with named parameters

2011-12-12 Thread Yeb Havinga
On 2011-12-11 16:26, Yeb Havinga wrote: On 2011-12-06 17:58, Kevin Grittner wrote: Kevin Grittnerkgri...@wicourts.gov wrote: Yeb Havingayebhavi...@gmail.com wrote: I personally tend to believe it doesn't even need to be an error. There is no technical reason not to allow it. All the user

[HACKERS] Why create tuplestore for each fetch?

2011-12-12 Thread 高增琦
Hi, I am reading code about cursor and fetch ... Here is a test: create table t (a int); insert into t values (1),(3),(5),(7),(9); insert into t select a+1 from t; begin; declare c cursor for select * from t order by a; fetch 3 in c; fetch 3 in c; fetch 3 in c; In func PortalRun,

Re: [HACKERS] [REVIEW] pg_last_xact_insert_timestamp

2011-12-12 Thread Robert Haas
On Sat, Dec 10, 2011 at 7:29 AM, Greg Smith g...@2ndquadrant.com wrote: -It adds overhead at every commit, even for people who aren't using it.  Probably not enough to matter, but it's yet another thing going through the often maligned as too heavy pgstat system, often. The bit about the

[HACKERS] psql output locations

2011-12-12 Thread Magnus Hagander
We're either pretty inconsistent with our output in psql, or I'm not completely understanding it.. I was trying to implement a switch that would let me put all the output in the query output channel controlled by \o, and not just the output of the query itself. Because that would make it possible

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2011-12-12 Thread Robert Haas
On Wed, Dec 7, 2011 at 2:34 AM, Shigeru Hanada shigeru.han...@gmail.com wrote: Sorry for delayed response. 2011/11/29 Albe Laurenz laurenz.a...@wien.gv.at: I think that this is not always safe even from PostgreSQL to PostgreSQL. If two databases have different collation, on strings will

Re: [HACKERS] [REVIEW] pg_last_xact_insert_timestamp

2011-12-12 Thread Simon Riggs
On Mon, Dec 12, 2011 at 1:45 PM, Robert Haas robertmh...@gmail.com wrote: It also strikes me that anything that is based on augmenting the walsender/walreceiver protocol leaves anyone who is using WAL shipping out in the cold.  I'm not clear from the comments you or Simon have made how

Re: [HACKERS] [REVIEW] pg_last_xact_insert_timestamp

2011-12-12 Thread Robert Haas
On Mon, Dec 12, 2011 at 9:24 AM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, Dec 12, 2011 at 1:45 PM, Robert Haas robertmh...@gmail.com wrote: It also strikes me that anything that is based on augmenting the walsender/walreceiver protocol leaves anyone who is using WAL shipping out in the

Re: [HACKERS] [REVIEW] pg_last_xact_insert_timestamp

2011-12-12 Thread Simon Riggs
On Mon, Dec 12, 2011 at 2:47 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Dec 12, 2011 at 9:24 AM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, Dec 12, 2011 at 1:45 PM, Robert Haas robertmh...@gmail.com wrote: It also strikes me that anything that is based on augmenting the

Re: [HACKERS] [REVIEW] pg_last_xact_insert_timestamp

2011-12-12 Thread Robert Haas
On Mon, Dec 12, 2011 at 9:51 AM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, Dec 12, 2011 at 2:47 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Dec 12, 2011 at 9:24 AM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, Dec 12, 2011 at 1:45 PM, Robert Haas robertmh...@gmail.com wrote:

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-12-12 Thread Lars Kanis
Am Freitag, 9. Dezember 2011, 15:31:17 schrieb Andrew Dunstan: Yeah, fair enough. I'll work on that. Many thanks for reviewing, tweaking and commiting the patch! One thing I wonder about, is this snippet. Is the define really needed now? * The Mingw64 headers choke if this is already defined -

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-12-12 Thread Andrew Dunstan
On 12/12/2011 06:43 AM, Mark Cave-Ayland wrote: configuration, it seems to me that it would be fine to commit a patch that made everything work, but for the compiler bug. We could refrain from stating that we officially support that configuration until the compiler bug is fixed, or even

[HACKERS] Is anybody actually using XLR_BKP_REMOVABLE?

2011-12-12 Thread Tom Lane
Back in 2007 (commit a8d539f12498de52453c8113892cbf48cc62478d), we reduced the maximum number of backup blocks per WAL record from 4 to 3, in order to permit addition of an XLR_BKP_REMOVABLE flag bit that purports to show whether it's safe to suppress full-page-image backup blocks in an external

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-12-12 Thread Andrew Dunstan
On 12/12/2011 09:54 AM, Lars Kanis wrote: Am Freitag, 9. Dezember 2011, 15:31:17 schrieb Andrew Dunstan: Yeah, fair enough. I'll work on that. Many thanks for reviewing, tweaking and commiting the patch! One thing I wonder about, is this snippet. Is the define really needed now? * The

Re: [HACKERS] [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

2011-12-12 Thread Lars Kanis
Am Montag, 12. Dezember 2011, 10:19:46 schrieb Andrew Dunstan: On 12/12/2011 09:54 AM, Lars Kanis wrote: Am Freitag, 9. Dezember 2011, 15:31:17 schrieb Andrew Dunstan: Yeah, fair enough. I'll work on that. Many thanks for reviewing, tweaking and commiting the patch! One thing I wonder

Re: [HACKERS] Is anybody actually using XLR_BKP_REMOVABLE?

2011-12-12 Thread Simon Riggs
On Mon, Dec 12, 2011 at 3:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Furthermore, what the XLR_BKP_REMOVABLE bit actually reports is just whether a backup operation is in progress, and I think we have now (or easily could) add reporting records to the WAL stream that tell when a backup starts

Re: [HACKERS] Is anybody actually using XLR_BKP_REMOVABLE?

2011-12-12 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Mon, Dec 12, 2011 at 3:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Furthermore, what the XLR_BKP_REMOVABLE bit actually reports is just whether a backup operation is in progress, and I think we have now (or easily could) add reporting records to the

Re: [HACKERS] review: CHECK FUNCTION statement

2011-12-12 Thread Albe Laurenz
Pavel Stehule wrote: there is merged patch Works fine, except that there are still missing const qualifiers in copyfuncs.c and equalfuncs.c that lead to compiler warnings. One thing I forgot to mention: I thought there was a consensus to add a WITH() or OPTIONS() clause to pass options to the

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-12 Thread Julien Tachoires
Hi, 2011/12/10 Jaime Casanova ja...@2ndquadrant.com: On Mon, Nov 28, 2011 at 1:32 PM, Julien Tachoires jul...@gmail.com wrote: 2) after CLUSTER the index of the toast table gets moved to the same tablespace as the main table there is still a variant of this one, i created 3 tablespaces

Re: [HACKERS] review: CHECK FUNCTION statement

2011-12-12 Thread Pavel Stehule
hello 2011/12/12 Albe Laurenz laurenz.a...@wien.gv.at: Pavel Stehule wrote: there is merged patch Works fine, except that there are still missing const qualifiers in copyfuncs.c and equalfuncs.c that lead to compiler warnings. One thing I forgot to mention: I thought there was a consensus

Re: [HACKERS] Is anybody actually using XLR_BKP_REMOVABLE?

2011-12-12 Thread Simon Riggs
On Mon, Dec 12, 2011 at 3:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On Mon, Dec 12, 2011 at 3:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Furthermore, what the XLR_BKP_REMOVABLE bit actually reports is just whether a backup operation is in progress, and

Re: [HACKERS] Is anybody actually using XLR_BKP_REMOVABLE?

2011-12-12 Thread Jesper Krogh
So: is there actually any such compression program out there? Would anybody really cry if this flag went away? Perhaps http://pglesslog.projects.postgresql.org/ Jesper

Re: [HACKERS] Command Triggers

2011-12-12 Thread Robert Haas
On Sun, Dec 11, 2011 at 1:55 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Andres Freund and...@anarazel.de writes: Hm. I just noticed a relatively big hole in the patch: The handling of deletion of dependent objects currently is nonexistant because they don't go through ProcessUtility...

Re: [HACKERS] Command Triggers

2011-12-12 Thread Alvaro Herrera
Excerpts from Robert Haas's message of lun dic 12 13:32:45 -0300 2011: On Sun, Dec 11, 2011 at 1:55 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Andres Freund and...@anarazel.de writes: Hm. I just noticed a relatively big hole in the patch: The handling of deletion of dependent

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-12 Thread Robert Haas
On Sat, Dec 10, 2011 at 4:16 PM, Jaime Casanova ja...@2ndquadrant.com wrote: now, if we are now supporting this variants ALTER TABLE SET TABLE TABLESPACE ALTER TABLE SET TOAST TABLESPACE why not also support ALTER TABLE SET INDEX TABLESPACE which should have the same behaviour as ALTER INDEX

Re: [HACKERS] Command Triggers

2011-12-12 Thread Andres Freund
On Monday, December 12, 2011 05:32:45 PM Robert Haas wrote: On Sun, Dec 11, 2011 at 1:55 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Andres Freund and...@anarazel.de writes: Hm. I just noticed a relatively big hole in the patch: The handling of deletion of dependent objects

Re: [HACKERS] [v9.2] Fix Leaky View Problem

2011-12-12 Thread Kohei KaiGai
The attached patches are cut-off version based on the latest Robert's updates. The v8.regtest adds regression test cases on variable leaky-view scenarios with/without security-barrier property. The v8.option-1 add checks around restriction_selectivity, and prevent to invoke estimator function if

Re: [HACKERS] Command Triggers

2011-12-12 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@commandprompt.com writes: Yeah. I remember mentioning the ability of CREATE SCHEMA to embed all sort of object creation commands in a single top-level command, and being handwaved away by Jan. Nobody knows about that, I was told. In fact CREATE SCHEMA implementation

Re: [HACKERS] Is anybody actually using XLR_BKP_REMOVABLE?

2011-12-12 Thread Tom Lane
Jesper Krogh jes...@krogh.cc writes: So: is there actually any such compression program out there? Perhaps http://pglesslog.projects.postgresql.org/ Hah ... the search facilities on pgfoundry really do leave something to be desired :-( So I guess we should try to preserve the functionality.

Re: [HACKERS] static or dynamic libpgport

2011-12-12 Thread Andrew Dunstan
On 12/10/2011 08:26 PM, Tom Lane wrote: The other thing is we'd need to turn on flags that make the object suitable for a dynamic library (e.g. -fpic). Right now, libpq laboriously rebuilds all the .o files it needs from src/port/ so as to get them with -fpic. It would be nice if we could

Re: [HACKERS] Configuration include directory

2011-12-12 Thread Greg Smith
Attached is an update to my earlier patch. This clears my own bug, usability concerns, and implementation ideas list on this one. There's full documentation on this now, including some suggested ways all these include features might be used. Since there's so much controversy around the way

Re: [HACKERS] Configuration include directory

2011-12-12 Thread Greg Smith
On 12/12/2011 01:34 PM, Greg Smith wrote: You can see a snapshot of the new doc page I built at http://http://www.westnet.com/~gsmith/config-setting.html One minute past send note on brain fade: this section include '00shared.conf' include '01memory.conf' include '02server.conf' Was a

Re: GiST for range types (was Re: [HACKERS] Range Types - typo + NULL string constructor)

2011-12-12 Thread Jeff Davis
On Fri, 2011-12-02 at 15:48 +0400, Alexander Korotkov wrote: Rebased with head. Thank you. I have attached a patch that's mostly just cleanup to this one. Comments: * You use the term ordinal range quite a lot, which I haven't heard before. Is that a mathematical term, or do you mean

Re: [HACKERS] IDLE in transaction introspection

2011-12-12 Thread Magnus Hagander
On Wed, Dec 7, 2011 at 17:45, Scott Mead sco...@openscg.com wrote: On Tue, Dec 6, 2011 at 6:38 AM, Magnus Hagander mag...@hagander.net wrote: On Sat, Nov 19, 2011 at 02:55, Scott Mead sco...@openscg.com wrote: On Thu, Nov 17, 2011 at 11:58 AM, Scott Mead sco...@openscg.com wrote: On

Re: [HACKERS] Command Triggers

2011-12-12 Thread Robert Haas
On Mon, Dec 12, 2011 at 11:49 AM, Andres Freund and...@anarazel.de wrote: I haven't yet thought about your specific proposal here in enough to have a fully-formed opinion, but I am a little nervous that this may turn out to be one of those cases where the obvious API ends up working less well

Re: [HACKERS] includeifexists in configuration file

2011-12-12 Thread Greg Smith
On 11/16/2011 10:19 AM, Robert Haas wrote: I haven't read the code yet, but just to get the bikeshedding started, I think it might be better to call this include_if_exists rather than running it together as one word. What's going on, it's like this bikeshed just disappeared. I should

Re: [HACKERS] pg_dump --exclude-table-data

2011-12-12 Thread Andrew Dunstan
On 12/08/2011 11:36 AM, Andrew Dunstan wrote: On 12/08/2011 11:13 AM, Robert Haas wrote: Ah, hmm. Well, maybe it's fine the way that you have it. But I'd be tempted to at least add a sentence to the sgml documentation for each option referring to the other, e.g. To dump only schema for

Re: [HACKERS] Is anybody actually using XLR_BKP_REMOVABLE?

2011-12-12 Thread Simon Riggs
On Mon, Dec 12, 2011 at 5:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Jesper Krogh jes...@krogh.cc writes: So: is there actually any such compression program out there? Perhaps http://pglesslog.projects.postgresql.org/ Hah ... the search facilities on pgfoundry really do leave something to be

Re: [HACKERS] static or dynamic libpgport

2011-12-12 Thread Peter Eisentraut
On lör, 2011-12-10 at 20:26 -0500, Tom Lane wrote: The other thing is we'd need to turn on flags that make the object suitable for a dynamic library (e.g. -fpic). Right now, libpq laboriously rebuilds all the .o files it needs from src/port/ so as to get them with -fpic. It would be

Re: [HACKERS] [REVIEW] Patch for cursor calling with named parameters

2011-12-12 Thread Kevin Grittner
Yeb Havinga wrote: Forgot to copy regression output to expected - attached v7 fixes that. This version addresses all of my concerns. It applies cleanly and compiles without warning against current HEAD and performs as advertised. I'm marking it Ready for Committer. -Kevin -- Sent via

Re: [HACKERS] static or dynamic libpgport

2011-12-12 Thread Peter Eisentraut
On fre, 2011-12-09 at 11:13 -0500, Andrew Dunstan wrote: Is there any good reason why we shouldn't build and install a dynamic libpgport.so? Just note, if you do this, you need to carefully manage API, ABI, soname, symbol list, and all that. Every time you tweak configure's decision about

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Robert Haas
On Mon, Dec 5, 2011 at 3:12 PM, Bruce Momjian br...@momjian.us wrote: Where are we with adding JSON for Postgres 9.2?  We got bogged down in the data representation last time we discussed this. We're waiting for you to send a patch that resolves all previously-raised issues. :-) In all

Re: [HACKERS] static or dynamic libpgport

2011-12-12 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On lör, 2011-12-10 at 20:26 -0500, Tom Lane wrote: Right now, libpq laboriously rebuilds all the .o files it needs from src/port/ so as to get them with -fpic. It would be nice if we could clean that up while we're doing this. It might be all right

Re: [HACKERS] psql output locations

2011-12-12 Thread Peter Eisentraut
On mån, 2011-12-12 at 14:47 +0100, Magnus Hagander wrote: We're either pretty inconsistent with our output in psql, or I'm not completely understanding it.. I was trying to implement a switch that would let me put all the output in the query output channel controlled by \o, and not just the

Re: [HACKERS] static or dynamic libpgport

2011-12-12 Thread Andrew Dunstan
On 12/12/2011 02:59 PM, Tom Lane wrote: Peter Eisentrautpete...@gmx.net writes: On lör, 2011-12-10 at 20:26 -0500, Tom Lane wrote: Right now, libpq laboriously rebuilds all the .o files it needs from src/port/ so as to get them with -fpic. It would be nice if we could clean that up while

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

2011-12-12 Thread Alvaro Herrera
Noah, Many thanks for this review. I'm going through items on it; definitely there are serious issues here, as well as minor things that also need fixing. Thanks for all the detail. I'll post an updated patch shortly (probably not today though); in the meantime, this bit: Excerpts from Noah

Re: [HACKERS] Command Triggers

2011-12-12 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: It seems to me (and it may seem differently to other people) that what most people who want to trap DDL events really want to do is either [ detailed analysis, mostly right on spot ] Yeah, I'm proposing a rather crude tool. I think it's still

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Simon Riggs
On Mon, Dec 12, 2011 at 7:58 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Dec 5, 2011 at 3:12 PM, Bruce Momjian br...@momjian.us wrote: Where are we with adding JSON for Postgres 9.2?  We got bogged down in the data representation last time we discussed this. We're waiting for you to

Re: [HACKERS] [PATCH] Caching for stable expressions with constant arguments v3

2011-12-12 Thread Marti Raudsepp
On Sun, Dec 4, 2011 at 22:53, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: I wonder if it would be better to add the CacheExpr nodes to the tree as a separate pass, instead of shoehorning it into eval_const_expressions? I think would be more readable that way, even though a

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Robert Haas
On Mon, Dec 12, 2011 at 3:38 PM, Simon Riggs si...@2ndquadrant.com wrote: Rather than fuss with specific data formats, why not implement something a little more useful? At present we can have typmods passed as a cstring, so it should be possible to add typmods onto the TEXT data type. e.g.

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

2011-12-12 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of lun dic 12 17:20:39 -0300 2011: I found that this is caused by mxid_to_string being leaked all over the place :-( I fixed it by making the returned string be a static that's malloced and then freed on the next call. There's still virtsize growth

Re: [HACKERS] includeifexists in configuration file

2011-12-12 Thread Ross Reedstrom
On Mon, Dec 12, 2011 at 02:24:53PM -0500, Greg Smith wrote: On 11/16/2011 10:19 AM, Robert Haas wrote: I haven't read the code yet, but just to get the bikeshedding started, I think it might be better to call this include_if_exists rather than running it together as one word. What's going

Re: [HACKERS] [PATCH] Caching for stable expressions with constant arguments v3

2011-12-12 Thread Tom Lane
Marti Raudsepp ma...@juffo.org writes: The 'struct Expr' type could have another attribute that stores whether its sub-expressions contain stable/volatile functions, and whether it only contains of constant arguments. This attribute would be filled in for every Expr by eval_const_expressions.

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Simon Riggs
On Mon, Dec 12, 2011 at 8:54 PM, Robert Haas robertmh...@gmail.com wrote: There are way too many places that assume that the typmod can just be discarded. If true, that probably ought to be documented cos it sounds fairly important. Where and when is it true? --  Simon Riggs 

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Robert Haas
On Mon, Dec 12, 2011 at 4:08 PM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, Dec 12, 2011 at 8:54 PM, Robert Haas robertmh...@gmail.com wrote: There are way too many places that assume that the typmod can just be discarded. If true, that probably ought to be documented cos it sounds

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Peter Eisentraut
On mån, 2011-12-12 at 21:08 +, Simon Riggs wrote: On Mon, Dec 12, 2011 at 8:54 PM, Robert Haas robertmh...@gmail.com wrote: There are way too many places that assume that the typmod can just be discarded. If true, that probably ought to be documented cos it sounds fairly important.

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread David E. Wheeler
On Dec 12, 2011, at 12:54 PM, Robert Haas wrote: I don't think that's going to fly, because =(text,text) probably has different semantics from =(json,json). No question: david=# select '{foo: 1, bar: 2}'::json = '{bar: 2, foo: 1}'::json; ?column? -- t (1 row)

Re: [HACKERS] Is anybody actually using XLR_BKP_REMOVABLE?

2011-12-12 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Mon, Dec 12, 2011 at 3:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: It occurs to me also that we could just move the flag from per-WAL-record info bytes to per-page or even per-segment WAL headers. Because we now force a segment switch when starting a

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Andrew Dunstan
On 12/12/2011 03:54 PM, Robert Haas wrote: On Mon, Dec 12, 2011 at 3:38 PM, Simon Riggssi...@2ndquadrant.com wrote: Rather than fuss with specific data formats, why not implement something a little more useful? At present we can have typmods passed as a cstring, so it should be possible to

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Josh Berkus
Bruce, I thought that Joseph Adams was still working on this, sponsored by Heroku. Joseph? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] pg_restore --no-post-data and --post-data-only

2011-12-12 Thread Andrew Dunstan
On 12/08/2011 09:18 PM, Joachim Wieland wrote: On Tue, Nov 15, 2011 at 6:14 PM, Andrew Dunstanand...@dunslane.net wrote: Updated version with pg_restore included is attached. The patch applies with some fuzz by now but compiles without errors or warnings. The feature just works, it is not

Re: [HACKERS] includeifexists in configuration file

2011-12-12 Thread Andrew Dunstan
On 12/12/2011 02:24 PM, Greg Smith wrote: On 11/16/2011 10:19 AM, Robert Haas wrote: I haven't read the code yet, but just to get the bikeshedding started, I think it might be better to call this include_if_exists rather than running it together as one word. What's going on, it's like this

[HACKERS] WIP: URI connection string support for libpq

2011-12-12 Thread Alexander Shulgin
Hello Hackers, Attached is a work-in-progress patch for URI connection string syntax support in libpq. The recent discussion (also pointing to the original one) is here: http://archives.postgresql.org/message-id/132180-sup-1235@moon The patch adds support for the following syntax in

Re: [HACKERS] [REVIEW] pg_last_xact_insert_timestamp

2011-12-12 Thread Greg Smith
On 12/12/2011 08:45 AM, Robert Haas wrote: But I'm skeptical that anything that we only update once per checkpoint cycle will help much in calculating an accurate lag value. I'm sure there is no upper bound on how much WAL lag you can build up between commit/abort records either; they can be

Re: [HACKERS] WIP: URI connection string support for libpq

2011-12-12 Thread Peter van Hardenberg
On Mon, Dec 12, 2011 at 2:06 PM, Alexander Shulgin a...@commandprompt.com wrote:  psql -d postgresql://user@pw:host:port/dbname?param1=value1param2=value2... I'd like to make the controversial proposal that the URL prefix should be postgres: instead of postgresql:. Postgres is a widely

Re: [HACKERS] Is anybody actually using XLR_BKP_REMOVABLE?

2011-12-12 Thread Tom Lane
I wrote: Simon Riggs si...@2ndquadrant.com writes: I'll volunteer. Assume you can reuse the flag and I will patch afterwards. Thanks for the offer, but after thinking about it a bit more I realized that this change is quite trivial, so I just went ahead and did it along with the change in

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Peter van Hardenberg
We reached out to Joseph to see if we could help sponsor the project, but never really heard back from him. Because we haven't heard from him in a while we've been using PL/V8 to validate a JSON datatype simulated by a DOMAIN with a simple acceptance function. (See below.) This is not ideally

Re: [HACKERS] WIP: URI connection string support for libpq

2011-12-12 Thread David E. Wheeler
On Dec 12, 2011, at 3:55 PM, Peter van Hardenberg wrote: I'd like to make the controversial proposal that the URL prefix should be postgres: instead of postgresql:. Postgres is a widely accepted nickname for the project, and is eminently more pronounceable. Once the url is established it will

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread David E. Wheeler
On Dec 12, 2011, at 4:51 PM, Peter van Hardenberg wrote: Because we haven't heard from him in a while we've been using PL/V8 to validate a JSON datatype simulated by a DOMAIN with a simple acceptance function. (See below.) This is not ideally performant but thanks to V8's JIT the JSON parser

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Andrew Dunstan
On 12/12/2011 07:51 PM, Peter van Hardenberg wrote: We reached out to Joseph to see if we could help sponsor the project, but never really heard back from him. Because we haven't heard from him in a while we've been using PL/V8 to validate a JSON datatype simulated by a DOMAIN with a simple

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Daniel Farina
On Mon, Dec 12, 2011 at 4:51 PM, Peter van Hardenberg p...@pvh.ca wrote: PL/V8 is fast, it's sandboxed, and while it doesn't provide GIN or GIST operators out of the box, maybe those could be motivated by its inclusion. I also feel that a big problem with JSON as a data type is that there is

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Daniel Farina
On Mon, Dec 12, 2011 at 5:36 PM, Andrew Dunstan and...@dunslane.net wrote: The trouble with using JSON.parse() as a validator is that it's probably doing way too much work. PLV8 is cool, and I keep trying to get enough time to work on it more, but I don't think it's a substitute for a JSON type

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2011-12-12 Thread Shigeru Hanada
(2011/12/12 22:59), Robert Haas wrote: It does seem like this might not be enough information for the FDW to make good decisions about pushdown. Even supposing the server on the other hand is also PostgreSQL, the collation names might not match (if, say, one is running Windows, and the other,

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Andrew Dunstan
On 12/12/2011 08:46 PM, Daniel Farina wrote: On Mon, Dec 12, 2011 at 5:36 PM, Andrew Dunstanand...@dunslane.net wrote: The trouble with using JSON.parse() as a validator is that it's probably doing way too much work. PLV8 is cool, and I keep trying to get enough time to work on it more, but

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2011-12-12 Thread Jaime Casanova
On Mon, Dec 12, 2011 at 10:54 AM, Julien Tachoires jul...@gmail.com wrote: Hi, 2011/12/10 Jaime Casanova ja...@2ndquadrant.com: On Mon, Nov 28, 2011 at 1:32 PM, Julien Tachoires jul...@gmail.com wrote: 2) after CLUSTER the index of the toast table gets moved to the same tablespace as the

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Alvaro Herrera
Excerpts from Daniel Farina's message of lun dic 12 22:37:13 -0300 2011: * It'd be nice to pass intermediate in-memory representations rather than calling JSON.parse all the time, similar to OPAQUE except sound (so bogus pointers cannot be passed). Basically, an ephemeral type. It could

Re: [HACKERS] Arithmetic operators for macaddr type

2011-12-12 Thread Brendan Jurd
On 12 December 2011 15:59, Pavel Stehule pavel.steh...@gmail.com wrote: 2011/12/12 Brendan Jurd dire...@gmail.com: I just bumped into a situation where I wanted to do a little macaddr arithmetic in postgres.  I note that the inet type has support for bitwise AND, OR and NOT, as well as

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 12/12/2011 03:54 PM, Robert Haas wrote: There are way too many places that assume that the typmod can just be discarded. I don't think that's going to fly, because =(text,text) probably has different semantics from =(json,json). And certain

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Peter Eisentraut
On mån, 2011-12-12 at 16:51 -0800, Peter van Hardenberg wrote: Because we haven't heard from him in a while we've been using PL/V8 to validate a JSON datatype simulated by a DOMAIN with a simple acceptance function. (See below.) This is not ideally performant but thanks to V8's JIT the JSON

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Merlin Moncure
On Mon, Dec 12, 2011 at 7:37 PM, Daniel Farina dan...@heroku.com wrote: On Mon, Dec 12, 2011 at 4:51 PM, Peter van Hardenberg p...@pvh.ca wrote: PL/V8 is fast, it's sandboxed, and while it doesn't provide GIN or GIST operators out of the box, maybe those could be motivated by its inclusion.

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2011-12-12 Thread Tom Lane
Shigeru Hanada shigeru.han...@gmail.com writes: (2011/12/12 22:59), Robert Haas wrote: ... I feel like we might need a system here that allows for more explicit user control about what to push down vs. not, rather than assuming we'll be able to figure it out behind the scenes. Agreed. How

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Jan Urbański
- Original message - On Dec 12, 2011, at 4:51 PM, Peter van Hardenberg wrote: Because we haven't heard from him in a while we've been using PL/V8 to validate a JSON datatype simulated by a DOMAIN with a simple acceptance function. (See below.) This is not ideally performant but

Re: [HACKERS] JSON for PG 9.2

2011-12-12 Thread Simon Riggs
On Tue, Dec 13, 2011 at 5:22 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andrew Dunstan and...@dunslane.net writes: On 12/12/2011 03:54 PM, Robert Haas wrote: There are way too many places that assume that the typmod can just be discarded.  I don't think that's going to fly, because =(text,text)

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-12-12 Thread Greg Smith
On 12/11/2011 05:29 PM, Torello Querci wrote: I will try to adjust the patch and submit for the next Commit Fest if this is ok for you. I don't think we'll need this, it will take a bit to explain why though. First, thanks for returning this topic to discussion and keeping up with all