Re: [HACKERS] operator exclusion constraints

2009-11-02 Thread Peter Eisentraut
On Sun, 2009-11-01 at 22:42 +, Simon Riggs wrote: The current patch writes the syntax like this EXCLUSION USING gist (c CHECK WITH ) makes it look like a table constraint, yet it clearly refers to a single column. That looks very clumsy to read, to my eyes. I think the word CHECK

Re: [HACKERS] Proposal - temporal contrib module

2009-11-02 Thread Dimitri Fontaine
Jeff Davis pg...@j-davis.com writes: If I understand what you're saying, you're alluding to a type where you can do things like: RANGE(timestamptz) which would be equivalent to a PERIOD. The RANGE approach sounds so much better from here, as I have the prefix_range example nearby... it'd be

Re: [HACKERS] backup_label in a crash recovery

2009-11-02 Thread Albe Laurenz
Fujii Masao wrote: When a crash occurs before calling pg_stop_backup(), the subsequent crash recovery causes the FATAL error and outputs the following HINT message. If you are not restoring from a backup, try removing the file \%s/backup_label\. I wonder why backup_label isn't

[HACKERS] Architecture of walreceiver (Streaming Replication)

2009-11-02 Thread Fujii Masao
Hi, Recently, the development of SR is not progressing because of the indecision on whether walreceiver should be a subprocess of the startup process (i.e., a stand-alone program), or of postmaster. Since time is running out, I'd like to discuss about this and advance the project. The related

Re: [HACKERS] alpha2 bundled -- please verify

2009-11-02 Thread Peter Eisentraut
On Wed, 2009-10-28 at 22:28 +0200, Devrim GÜNDÜZ wrote: Peter, could you please provide md5sum for alpha2 tarball? I know we missed in alpha1. It would be better if the original packager would upload the md5sum. I was struggling internally with this one, because the tools currently in use are

Re: [HACKERS] alpha2 bundled -- please verify

2009-11-02 Thread Devrim GÜNDÜZ
On Mon, 2009-11-02 at 13:02 +0200, Peter Eisentraut wrote: Also, I'll be happy if you can also upload .bz2 file (for the lazy RPM packages who does not want to play with his spec files a lot). Done. I'll also add that to the build scripts for the new alpha. Thanks Peter. Regards, --

Re: [HACKERS] operator exclusion constraints

2009-11-02 Thread Simon Riggs
On Sun, 2009-11-01 at 18:07 -0500, Tom Lane wrote: Simon Riggs si...@2ndquadrant.com writes: The syntax be easier to read if it was stated as a comparison e.g. in the circle example CHECK ( NOT (NEW.c c)) USING GIST I don't think this is a good idea at all. NEW is a nonstandard

Re: [HACKERS] Architecture of walreceiver (Streaming Replication)

2009-11-02 Thread Robert Haas
On Nov 2, 2009, at 5:06 AM, Fujii Masao masao.fu...@gmail.com wrote: Hi, Recently, the development of SR is not progressing because of the indecision on whether walreceiver should be a subprocess of the startup process (i.e., a stand-alone program), or of postmaster. Since time is running out,

Re: [HACKERS] backup_label in a crash recovery

2009-11-02 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: I wonder why backup_label isn't automatically removed in normal crash recovery case. Removing it automatically could be catastrophic if done incorrectly, no? If that's intentional, a clusterware for shared disk failover system should remove

[HACKERS] libpq - extending PQexecParams/PQexecPrepared to specify resultFormat for individual result columns

2009-11-02 Thread Ivo Raisr
Hi guys, I hacked PostgreSQL 8.4.1 libpq and added a new function to specify resultFormat for individual result columns. Are you interested in a patch? (http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html says: There is not currently a provision to obtain different result columns in

Re: [HACKERS] libpq - extending PQexecParams/PQexecPrepared to specify resultFormat for individual result columns

2009-11-02 Thread Merlin Moncure
On Mon, Nov 2, 2009 at 6:00 AM, Ivo Raisr iv...@ivosh.net wrote: Hi guys, I hacked PostgreSQL 8.4.1 libpq and added a new function to specify resultFormat for individual result columns. Are you interested in a patch? (http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html says:

Re: [HACKERS] Architecture of walreceiver (Streaming Replication)

2009-11-02 Thread Euler Taveira de Oliveira
Fujii Masao escreveu: IMO, walreceiver should be a subprocess of postmaster for the following reasons. +1. I agree that the first version should be as close as possible to postmaster. My points are: (i) it will be easier to install (no need to install another third-party software), (ii) it

Re: [HACKERS] Architecture of walreceiver (Streaming Replication)

2009-11-02 Thread Robert Haas
On Mon, Nov 2, 2009 at 10:14 AM, Euler Taveira de Oliveira eu...@timbira.com wrote: BTW, are you going to submit another WIP patch for next commitfest? Well, Heikki was going to keep working on this and Hot Standby between CommitFests until it gets committed, but things seem to be stalled at the

Re: [HACKERS] libpq - extending PQexecParams/PQexecPrepared to specify resultFormat for individual result columns

2009-11-02 Thread David Fetter
On Mon, Nov 02, 2009 at 12:00:29PM +0100, Ivo Raisr wrote: Hi guys, I hacked PostgreSQL 8.4.1 libpq and added a new function to specify resultFormat for individual result columns. Are you interested in a patch? New features only go into git head (aka CVS TIP), so for future reference, only

Re: [HACKERS] libpq - extending PQexecParams/PQexecPrepared to specify resultFormat for individual result columns

2009-11-02 Thread Andrew Chernow
Ivo Raisr wrote: Hi guys, I hacked PostgreSQL 8.4.1 libpq and added a new function to specify resultFormat for individual result columns. Are you interested in a patch? (http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html says: There is not currently a provision to obtain different

[HACKERS] Some notes about Param handling with Oracle style plpgsql variables

2009-11-02 Thread Tom Lane
One of the interesting properties of Oracle-compatible variable references in plpgsql is that the set of variables referenced by a given query could change during a forced replan. For example, consider declare x int; r record; ... for r in select x,y from

Re: [HACKERS] PL/Perl backed crashed during spi_exec_query

2009-11-02 Thread Alexey Klyukin
On Oct 31, 2009, at 7:30 PM, Tom Lane wrote: Alexey Klyukin al...@commandprompt.com writes: One of our customers is running 8.2.14 and use a couple of pl/perl and pl/perlu functions written by CMD. Everything worked normally until they tried to call one particular pl/perl function from

Re: [HACKERS] Some notes about Param handling with Oracle style plpgsql variables

2009-11-02 Thread Pavel Stehule
2009/11/2 Tom Lane t...@sss.pgh.pa.us: One of the interesting properties of Oracle-compatible variable references in plpgsql is that the set of variables referenced by a given query could change during a forced replan.  For example, consider        declare x int;                r record;  

Re: [HACKERS] per-tablespace random_page_cost/seq_page_cost

2009-11-02 Thread Alvaro Herrera
Robert Haas escribió: I don't see anything in this code that is very rel-specific, so I think it would be possible to implement spcoptions by just defining RELOPT_KIND_TABLESPACE and ignoring the irony, but that has enough of an unsavory feeling that I'm sure someone is going to complain

Re: [HACKERS] Some notes about Param handling with Oracle style plpgsql variables

2009-11-02 Thread Robert Haas
On Mon, Nov 2, 2009 at 11:31 AM, Tom Lane t...@sss.pgh.pa.us wrote:  Another interesting property of this approach is that it'd fix the longstanding user complaint that constructions like        if (TG_OP = 'INSERT' and NEW.foo = 'bar') ... fail prematurely.  The executor would never demand

Re: [HACKERS] operator exclusion constraints

2009-11-02 Thread Jeff Davis
On Mon, 2009-11-02 at 07:38 +, Simon Riggs wrote: It bothers me that we would have completely separate syntax for this feature as opposed to normal SQL. It also doesn't make it easy to interpret from the business statement to the implementation. Notice that the , above means AND. Yes, in

Re: [HACKERS] operator exclusion constraints

2009-11-02 Thread Jeff Davis
On Mon, 2009-11-02 at 08:25 +, Peter Eisentraut wrote: I think the word CHECK should be avoided completely in this syntax, to avoid confusion with CHECK constraints. This is an easy change. I don't have a strong opinion, so the only thing I can think to do is ask for a vote. Do you have a

[HACKERS] Renaming conversion procs (was Re: [GENERAL] Error on compile for Windows)

2009-11-02 Thread Tom Lane
Steve Atkins st...@blighty.com writes: I've also seen it with winzip. Again, ISTR that the exact limits were obscure but that restricting the path to less than 100 characters avoided any problems. Hmm. It strikes me that the names seen by tar include postgresql-x.y.z/. The only file paths

Re: [HACKERS] operator exclusion constraints

2009-11-02 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: On Mon, 2009-11-02 at 08:25 +, Peter Eisentraut wrote: I think the word CHECK should be avoided completely in this syntax, to avoid confusion with CHECK constraints. This is an easy change. I don't have a strong opinion, so the only thing I can think

Re: [HACKERS] Architecture of walreceiver (Streaming Replication)

2009-11-02 Thread Heikki Linnakangas
Robert Haas wrote: On Mon, Nov 2, 2009 at 10:14 AM, Euler Taveira de Oliveira eu...@timbira.com wrote: BTW, are you going to submit another WIP patch for next commitfest? Well, Heikki was going to keep working on this and Hot Standby between CommitFests until it gets committed, but things

Re: [HACKERS] Architecture of walreceiver (Streaming Replication)

2009-11-02 Thread Heikki Linnakangas
Euler Taveira de Oliveira wrote: Fujii Masao escreveu: IMO, walreceiver should be a subprocess of postmaster for the following reasons. +1. I agree that the first version should be as close as possible to postmaster. My points are: (i) it will be easier to install (no need to install

Re: [HACKERS] operator exclusion constraints

2009-11-02 Thread Simon Riggs
On Mon, 2009-11-02 at 13:12 -0500, Tom Lane wrote: Jeff Davis pg...@j-davis.com writes: On Mon, 2009-11-02 at 08:25 +, Peter Eisentraut wrote: I think the word CHECK should be avoided completely in this syntax, to avoid confusion with CHECK constraints. This is an easy change. I

[HACKERS] Re: Renaming conversion procs (was Re: [GENERAL] Error on compile for Windows)

2009-11-02 Thread Magnus Hagander
On Mon, Nov 2, 2009 at 18:54, Tom Lane t...@sss.pgh.pa.us wrote: Steve Atkins st...@blighty.com writes: I've also seen it with winzip. Again, ISTR that the exact limits were obscure but that restricting the path to less than 100 characters avoided any problems. Hmm.  It strikes me that the

Re: [HACKERS] Some notes about Param handling with Oracle style plpgsql variables

2009-11-02 Thread Pavel Stehule
2009/11/2 Tom Lane t...@sss.pgh.pa.us: One of the interesting properties of Oracle-compatible variable references in plpgsql is that the set of variables referenced by a given query could change during a forced replan.  For example, consider        declare x int;                r record;  

Re: [HACKERS] Some notes about Param handling with Oracle style plpgsql variables

2009-11-02 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2009/11/2 Tom Lane t...@sss.pgh.pa.us: This kinda calls into question whether the Oracle way is actually a good idea or not; but my purpose here is not to debate that, just to look at what it takes to implement it. This is reason, why I would to

Re: [HACKERS] Some notes about Param handling with Oracle style plpgsql variables

2009-11-02 Thread Pavel Stehule
2009/11/2 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: 2009/11/2 Tom Lane t...@sss.pgh.pa.us: This kinda calls into question whether the Oracle way is actually a good idea or not; but my purpose here is not to debate that, just to look at what it takes to

Re: [HACKERS] Renaming conversion procs (was Re: [GENERAL] Error on compile for Windows)

2009-11-02 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Mon, Nov 2, 2009 at 18:54, Tom Lane t...@sss.pgh.pa.us wrote: [ rename some conversion libraries to shorten source path names ] Seems like this would be a major PITA for packagers and end-user. If we actually wanted to back-patch it, I think the

Re: [HACKERS] Some notes about Param handling with Oracle style plpgsql variables

2009-11-02 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Nov 2, 2009 at 11:31 AM, Tom Lane t...@sss.pgh.pa.us wrote: Another interesting property of this approach is that it'd fix the longstanding user complaint that constructions like if (TG_OP = 'INSERT' and NEW.foo = 'bar') ... fail

Re: [HACKERS] per-tablespace random_page_cost/seq_page_cost

2009-11-02 Thread Dimitri Fontaine
Hi, excuse the quoting style... and the intrepid nature of the following content... -- dim Le 1 nov. 2009 à 13:43, Greg Stark gsst...@mit.edu a écrit : We could have a column for all booleans, a column for all integers, etc. but that's not really any more normalized than having a single

Re: [HACKERS] per-tablespace random_page_cost/seq_page_cost

2009-11-02 Thread Alvaro Herrera
Dimitri Fontaine escribió: Thé other day, on IRC, someone wanted a dynamic table accepting value in whichever column you name. That would probably mean having a special INSERT INTO which ALTER TABLE ... ADD COLUMN ... for you. That sounds more like something you'd do with hstore or something

Re: [HACKERS] per-tablespace random_page_cost/seq_page_cost

2009-11-02 Thread Robert Haas
On Mon, Nov 2, 2009 at 4:11 PM, Dimitri Fontaine dfonta...@hi-media.com wrote: Hi, excuse the quoting style... and the intrepid nature of the following content... -- dim Le 1 nov. 2009 à 13:43, Greg Stark gsst...@mit.edu a écrit : We could have a column for all booleans, a column for all

Re: [HACKERS] per-tablespace random_page_cost/seq_page_cost

2009-11-02 Thread Robert Haas
On Mon, Nov 2, 2009 at 12:40 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Robert Haas escribió: I don't see anything in this code that is very rel-specific, so I think it would be possible to implement spcoptions by just defining RELOPT_KIND_TABLESPACE and ignoring the irony, but that

Re: [HACKERS] A small bug in gram.y

2009-11-02 Thread Gokulakannan Somasundaram
Hmmm no-one else feels this as a bug The logic is that a function call is made for similar and the position where SIMILAR occurs is at the third position, but it has been coded that it is at fifth position. Thanks, Gokul. On Tue, Oct 27, 2009 at 6:51 AM, Gokulakannan Somasundaram

Re: [HACKERS] A small bug in gram.y

2009-11-02 Thread Heikki Linnakangas
Gokulakannan Somasundaram wrote: Hmmm no-one else feels this as a bug The logic is that a function call is made for similar and the position where SIMILAR occurs is at the third position, but it has been coded that it is at fifth position. The function call is constructed for the