Re: RFC: "UPSERT" in PostgreSQL

2014-09-28 Thread Simon Riggs
y with SQL standards. Even if you disagree with > some aspects of the specification of MERGE, wouldn't it be valuable to > implement it properly? Since I'm not the most knowledgeable person on this > topic, where can I learn more about the reasons for this choice?" A fair point. --

Re: RFC: "UPSERT" in PostgreSQL

2014-09-28 Thread Simon Riggs
; 2) The disparaging vocabulary you're using isn't acceptable in this forum, > 3) Personal attacks based on prejudice will not be tolerated. Well, for 1) any comments are most welcome. I didn't see any evidence of the other two. All opinions welcome. -- Simon Riggs http://w

Re: RFC: "UPSERT" in PostgreSQL

2014-09-28 Thread Simon Riggs
reSQL community and we would like to solicit open feedback about how such a feature might look and what aspects make it more/less likely to be adopted by Django. Detailed feedback on ORM related issues is welcome. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Dev

Re: RFC: "UPSERT" in PostgreSQL

2014-09-28 Thread Simon Riggs
AFTER UPDATE triggers fire } else { perform INSERT AFTER INSERT triggers fire } INSTEAD OF triggers would fire on views only, so would be shown in the above instead of the before triggers -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, T

Re: Support Negative Indexing on QuerySets

2013-07-31 Thread Simon Riggs
the ordering. i.e. it results in a sequential scan and should be avoided. I'd suggest an explicit option to change the ordering ASC | DESC, which is matched by a SQL Standard feature. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Servi

Re: Using EXISTS instead of IN for subqueries

2013-03-25 Thread Simon Riggs
t; to choose those semantics. Most likely, yes, so it looks like a bug fix now not an optimization. > Also, multicolumn NOT IN lookups aren't > supported on all databases (SQLite at least), so for that case NOT > EXISTS semantics is going to happen anyways. Yes, I think that's the

Re: Using EXISTS instead of IN for subqueries

2013-03-25 Thread Simon Riggs
ondition into the EXISTS > subclause might be a bit more complex. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- You received this message because you are subscribed to the Google Groups "Django deve

Re: Improvements to better support implementing optimistic concurrency control

2011-08-11 Thread Simon Riggs
On Wed, Aug 10, 2011 at 3:08 PM, Anssi Kääriäinen <anssi.kaariai...@thl.fi> wrote: > On 08/10/2011 03:18 PM, Simon Riggs wrote: > > That adds additional SELECT statements, which then extends a lock > window between the check statement and the changes. It works, but in >

Re: Improvements to better support implementing optimistic concurrency control

2011-08-10 Thread Simon Riggs
tion returns 0 rows then we know that the lock check failed and we can handle that. This keeps the locking optimistic and doesn't add any additional SQL statements. e.g. UPDATE foo SET col = newvalue, optimistic_lock_field = optimistic_lock_field + 1 WHERE pkcol = p_key AND optimisti

Re: Deferred constraint checking causing problems during test runs

2011-07-14 Thread Simon Riggs
lem. Thanks to everybody working on Django. --  Simon Riggs   http://www.2ndQuadrant.com/  PostgreSQL Development, 24x7 Support, Training & Services -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this

Re: Deferred constraint checking causing problems during test runs

2011-07-14 Thread Simon Riggs
On Sun, Jul 10, 2011 at 3:27 PM, Jim Dalton <jim.dal...@gmail.com> wrote: > On Jul 10, 2011, at 3:13 AM, Simon Riggs wrote: > >> Maintaining the property of deferrable constraints seems important >> here, so changing the deferrability of constraints, or overriding it >

Re: Deferred constraint checking causing problems during test runs

2011-07-10 Thread Simon Riggs
ately before the ROLLBACK at *end* of test. This will fire any outstanding checks. That way all constraint checks will occur in the same place they would during a commit, yet we can maintain the situation that the test ends with a rollback. --  Simon Riggs   http://www.2ndQuadrant.

Re: Conditional aggregations.

2011-06-29 Thread Simon Riggs
rough the case statement directly? That way *any* legal CASE statement can be used, without inventing new ORM syntax each time. --  Simon Riggs   http://www.2ndQuadrant.com/  PostgreSQL Development, 24x7 Support, Training & Services -- You received this message because you ar

Re: Invalid SQL generated by objects.all()[:1]?

2010-07-16 Thread Simon Riggs
SQL standard. SQL Standard formulation for this query syntax is new in SQL:2008 where it is now called OFFSET ... FETCH ... To my knowledge only DB2 and Postgres support the new standard syntax. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Training a

Re: MySQL index hints

2010-07-08 Thread Simon Riggs
ttom of every query by default, if a slice is not already defined. That would work for all DBMS. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Training and Services -- You received this message because you are subscribed to the Google Groups "Django devel

Re: Decision required: PostgreSQL minimum versions

2010-06-10 Thread Simon Riggs
nger in this, carrying goodwill between projects. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Training and Services -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to th

Re: Decision required: PostgreSQL minimum versions

2010-06-10 Thread Simon Riggs
s). So 8.2 is the minimum sensible version for next release of Django, though 8.3 should be minimum recommended with 8.4 current stable release as dev target. Happy to help with any issues arising from that move. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Development, 24x7 Suppor