Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-18 Thread Robert Haas
On Sun, Apr 15, 2012 at 12:29 PM, Tom Lane wrote: >> I think it would be a good idea for UPDATE and DELETE to expose >> a LIMIT option, but I can't really see the virtue in making that >> functionality available only through SPI. > > FWIW, I'm not excited about that.  You can get well-defined beha

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-15 Thread Tom Lane
Robert Haas writes: > On Thu, Apr 5, 2012 at 2:39 AM, Hitoshi Harada wrote: >> On Wed, Apr 4, 2012 at 8:00 AM, Tom Lane wrote: >>> Given the lack of complaints since 9.0, maybe we should not fix this >>> but just redefine the new behavior as being correct? But it seems >>> mighty inconsistent t

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-15 Thread Pavel Stehule
2012/4/15 Boszormenyi Zoltan : > 2012-04-14 18:15 keltezéssel, Peter Eisentraut írta: > >> On lör, 2012-04-14 at 08:23 -0400, Robert Haas wrote: >>> >>> On Sat, Apr 14, 2012 at 3:27 AM, Pavel Stehule >>>  wrote: > > It has a lot of sense.  Without it, it's very difficult to do logical >

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-15 Thread Boszormenyi Zoltan
2012-04-14 18:15 keltezéssel, Peter Eisentraut írta: On lör, 2012-04-14 at 08:23 -0400, Robert Haas wrote: On Sat, Apr 14, 2012 at 3:27 AM, Pavel Stehule wrote: It has a lot of sense. Without it, it's very difficult to do logical replication on a table with no primary key. (Whether or not pe

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-14 Thread Robert Haas
On Sat, Apr 14, 2012 at 12:15 PM, Peter Eisentraut wrote: > On lör, 2012-04-14 at 08:23 -0400, Robert Haas wrote: >> On Sat, Apr 14, 2012 at 3:27 AM, Pavel Stehule >> wrote: >> >> It has a lot of sense.  Without it, it's very difficult to do logical >> >> replication on a table with no primary k

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-14 Thread Pavel Stehule
2012/4/14 Peter Eisentraut : > On lör, 2012-04-14 at 08:23 -0400, Robert Haas wrote: >> On Sat, Apr 14, 2012 at 3:27 AM, Pavel Stehule >> wrote: >> >> It has a lot of sense.  Without it, it's very difficult to do logical >> >> replication on a table with no primary key. >> >> >> >> (Whether or no

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-14 Thread Peter Eisentraut
On lör, 2012-04-14 at 08:23 -0400, Robert Haas wrote: > On Sat, Apr 14, 2012 at 3:27 AM, Pavel Stehule > wrote: > >> It has a lot of sense. Without it, it's very difficult to do logical > >> replication on a table with no primary key. > >> > >> (Whether or not people should create such tables in

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-14 Thread Robert Haas
On Sat, Apr 14, 2012 at 3:27 AM, Pavel Stehule wrote: >> It has a lot of sense.  Without it, it's very difficult to do logical >> replication on a table with no primary key. >> >> (Whether or not people should create such tables in the first place >> is, of course, beside the point.) > > I am not

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-14 Thread Pavel Stehule
2012/4/14 Robert Haas : > On Fri, Apr 13, 2012 at 10:43 PM, Pavel Stehule > wrote: >>> Yeah.  I think it would be a good idea for UPDATE and DELETE to expose >>> a LIMIT option, but I can't really see the virtue in making that >>> functionality available only through SPI. >> >> I don't agree - LI

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-13 Thread Robert Haas
On Fri, Apr 13, 2012 at 10:43 PM, Pavel Stehule wrote: >> Yeah.  I think it would be a good idea for UPDATE and DELETE to expose >> a LIMIT option, but I can't really see the virtue in making that >> functionality available only through SPI. > > I don't agree - LIMIT after UPDATE or DELETE has no

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-13 Thread Pavel Stehule
> > Yeah.  I think it would be a good idea for UPDATE and DELETE to expose > a LIMIT option, but I can't really see the virtue in making that > functionality available only through SPI. > I don't agree - LIMIT after UPDATE or DELETE has no sense. Clean solution should be based on using updateable

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-13 Thread Robert Haas
On Thu, Apr 5, 2012 at 2:39 AM, Hitoshi Harada wrote: > On Wed, Apr 4, 2012 at 8:00 AM, Tom Lane wrote: >> umi.tan...@gmail.com writes: >>> http://www.postgresql.org/docs/9.1/static/spi-spi-execute.html >> >>> === >>> SPI_execute("INSERT INTO foo SELECT * FROM bar", false, 5); >>> will allow at m

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-04 Thread Hitoshi Harada
On Wed, Apr 4, 2012 at 8:00 AM, Tom Lane wrote: > umi.tan...@gmail.com writes: >> http://www.postgresql.org/docs/9.1/static/spi-spi-execute.html > >> === >> SPI_execute("INSERT INTO foo SELECT * FROM bar", false, 5); >> will allow at most 5 rows to be inserted into the table. >> === > >> This seem

Re: [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-04-04 Thread Tom Lane
umi.tan...@gmail.com writes: > http://www.postgresql.org/docs/9.1/static/spi-spi-execute.html > === > SPI_execute("INSERT INTO foo SELECT * FROM bar", false, 5); > will allow at most 5 rows to be inserted into the table. > === > This seems not true unless I'm missing something. Hmm ... that did