On Thu, Jul 23, 2009 at 1:31 AM, Richard Huxtond...@archonet.com wrote:
- Let me use SAVEPOINT outside of a transaction,
You are never outside a transaction. All queries are executed within a
transaction.
Transaction block, then, if you insist.
I think this is the root of your problem -
Glenn Maynard wrote:
On Thu, Jul 23, 2009 at 1:31 AM, Richard Huxtond...@archonet.com wrote:
- Let me use SAVEPOINT outside of a transaction,
You are never outside a transaction. All queries are executed within a
transaction.
Transaction block, then, if you insist.
I think this is the
Andreas wrote:
Hi,
The source select counts log-events per user.
All is well when a user has at least one event per log_type in the log
within a given timespan.
If one log_type is missing COUNT() has nothing to count and there is
expectedly no result line that says 0.
BUT I need this 0-line
On Thu, Jul 23, 2009 at 02:04:53AM -0400, Glenn Maynard wrote:
On Thu, Jul 23, 2009 at 1:31 AM, Richard Huxtond...@archonet.com wrote:
- Let me use SAVEPOINT outside of a transaction,
You are never outside a transaction. All queries are executed within a
transaction.
Transaction
In response to Andreas :
Hi,
The source select counts log-events per user.
All is well when a user has at least one event per log_type in the log
within a given timespan.
If one log_type is missing COUNT() has nothing to count and there is
expectedly no result line that says 0.
BUT I need
Joshua Tolley wrote:
On Thu, Jul 23, 2009 at 02:04:53AM -0400, Glenn Maynard wrote:
On Thu, Jul 23, 2009 at 1:31 AM, Richard Huxtond...@archonet.com wrote:
- Let me use SAVEPOINT outside of a transaction,
You are never outside a transaction. All queries are executed within a
transaction.
In response to A. Kretschmer :
test=*# select foo.user_name, foo.log_type, sum(case when log_type_fk is
not null then 1 else 0 end) from (select user_id, user_name,
log_type_id, log_type from users cross join log_type) foo full join log
on ((foo.user_id, foo.log_type_id)=(log.user_fk,
Chris, 23.07.2009 09:06:
psql -d dbname
..
# select now();
now
---
2009-07-23 17:04:21.406424+10
(1 row)
Time: 2.434 ms
(csm...@[local]:5432) 17:04:21 [test]
# savepoint xyz;
ERROR: SAVEPOINT can only be used in transaction blocks
Glenn Maynard wrote:
On Thu, Jul 23, 2009 at 2:41 AM, Richard Huxtond...@archonet.com wrote:
Ah [cue light-bulb effect], I think I understand. Your function isn't in the
database is it? Surely your application knows if it's issuing BEGIN..COMMIT?
I'm writing a Python library call. It has no
On Thu, Jul 23, 2009 at 1:01 AM, Andreasmaps...@gmx.net wrote:
SELECT user_name, log_type_fk, COUNT(log_type_fk)
FROM log
JOIN users ON (user_id = user_fk)
WHERE (ts IS BETWEEN sometime AND another)
GROUP BY user_name, log_type_fk
ORDER BY user_name, log_type_fk
create table users
* Glenn Maynard (gl...@zewt.org) wrote:
The ORM can't control transactions, can't call functions or can't set
savepoints?
It can't write the necessary SQL to say insert this unless it already
exists, namely:
If it can't cleanly handle failure cases like this one, then I think
your issue
On Thursday 23 July 2009 12:39:23 am Glenn Maynard wrote:
The ORM on a whole is decent, but there are isolated areas where it's
very braindamaged--this is one of them. They have a stable-release
API-compatibility policy, which I think just gets them stuck with some
really bad decisions for
Hi,
I made up a query to make a count for each item for each month/year:
SELECTArtnr_ID, to_char(Date_plan,) AS Jaar,
to_char(Date_plan,MM) AS Maand, Count(tblArtnrs.Artikelnr) AS
Monthly_count, val1,val2,val3
FROM ((tblAnalyses INNER JOIN tblStudies ON tblAnalyses.Studie_ID =
13 matches
Mail list logo