am Wed, dem 05.09.2007, um 13:45:46 +1000 mailte novice folgendes:
> Hello All,
>
> SELECT notification_time, finished_time, sum(finished_time -
> notification_time) as actual
> FROM log
> GROUP BY notification_time, finished_time;
>
> gives me:
>
>notification_time| finished_time
correction:
> The result I'm expecting for the above to be
>
>notification_time| finished_time | actual
> ++-
2007-07-06 15:50:00+10 | 2007-07-09 07:10:00+10 | 01:20:00
> 2007-07-07 12:30:00+10 | 2007-07-09 07
Hello All,
SELECT notification_time, finished_time, sum(finished_time -
notification_time) as actual
FROM log
GROUP BY notification_time, finished_time;
gives me:
notification_time| finished_time | actual
++-
20
Thanks guys
Lesson learned
On Tue, 4 Sep 2007, Scott Marlowe wrote:
On 8/31/07, Richard Ray <[EMAIL PROTECTED]> wrote:
Changing to enable_seqscan = on does solve this problem, thanks
Is there some method of crafting a query that will assert my wishes to the
planner
When is enable_seqscan = o
Richard Huxton <[EMAIL PROTECTED]> writes:
> I think it's just the brackets () - plpgsql's parser isn't terribly
> sophisticated.
It's not plpgsql's fault --- you'll get the same result if you put
parentheses around a DELETE command at the SQL command line.
regression=# (delete from fool);
ERROR
chester c young wrote:
> how are you preventing recursion?
>
>
That could be the problem, suggestions?
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
I want to write a trigger that updates a different row on the same
table. It's pretty basic: before the any row in his table updated I
want to set a only row that has the value true to false. I keep getting
this error:
SQL statement "update theirry.articles set master_featured = false where
mast
Richard Broersma Jr <[EMAIL PROTECTED]> writes:
> --- "Luiz K. Matsumura" <[EMAIL PROTECTED]> wrote:
>> But when I open a query tool window and do:
>> SELECT * FROM view1;
>> Now, again type1 column returns as bpchar.
> This might be a good question to ask on the PGAdmin mailing list or even try
Richard Huxton provided the answer: It's a prepared query-plan,
which means it can't plan to use the index because the next EXECUTE
might have reconciled=true.
Bryce Nesbitt wrote:
...Which is all good. But the Hibernate version
of query still takes several seconds, and still appears in
On 8/31/07, Richard Ray <[EMAIL PROTECTED]> wrote:
> Changing to enable_seqscan = on does solve this problem, thanks
> Is there some method of crafting a query that will assert my wishes to the
> planner
> When is enable_seqscan = off appropriate
enable_xxx = off are troubleshooting tools. They
Amazing what a bracket can do :)
Thanks for the help.
>>> Richard Huxton <[EMAIL PROTECTED]> 2007-09-04 12:45 >>>
Bart Degryse wrote:
> I'm trying to use a delete statement with returning clause in a function:
> FOR rec IN (
> delete from billing_errors_new where errortypeid IN (1,2) re
--- "Luiz K. Matsumura" <[EMAIL PROTECTED]> wrote:
> Ugh, I'm totally crazy with this views
> I'm using pgadmin with postgres, when I clink on "view the data of
> selected object" button all works fine.
> But when I open a query tool window and do:
>
> SELECT * FROM view1;
> Now, again type1 co
--- "Luiz K. Matsumura" <[EMAIL PROTECTED]> wrote:
> When I drop the view first , and then create again the view (in a
> separated transaction), now the command works! (this is a bug?)
Well according to the manual, it is working as it is intended to work:
http://www.postgresql.org/docs/8.2/intera
Bart Degryse wrote:
I'm trying to use a delete statement with returning clause in a function:
FOR rec IN (
delete from billing_errors_new where errortypeid IN (1,2) returning *)
LOOP
I get following error though:
ERROR: syntax error at or near "delete" at character 4
QU
Hello all,
I beg your pardon if I do not know some thing, but I was disappointed
after taken an upgrade from 8.0.1 to 8.0.13, now the query, that I had
optimized so far to run for 92 sec on 8.0.1, takes 106 seconds on 8.0.13.
The plan seems to stay unmodified, except statistics used for its
I'm trying to use a delete statement with returning clause in a function:
CREATE OR REPLACE FUNCTION "public"."test_delete"() RETURNS void AS
$body$
DECLARE
rec billing_errors_new;
BEGIN
FOR rec IN (
delete from billing_errors_new where errortypeid IN (1,2) returning *)
LO
Hello Marc,
at first I tried to solve your update of the tables. The example you
gave should be done with an update statement like the following:
update test_table
set mygroup=(select t.mygroup
from test_table as t
where t.family = test_table.family
Hello,
I have a large upddate to perform on tables which are dynamically
generated (dynamic names).
In this simplified example, the operation should replace in each family
the "mygroup" of each item of rang=0 with the "mygroup" value of the
element of rang=1 :
(the * indicate the modified valu
Bryce Nesbitt wrote:
Tom Lane wrote:
Bryce Nesbitt <[EMAIL PROTECTED]> writes:
They give different results for NULL --- specifically, NULL for the
former and FALSE for the latter. Don't blame me, it's in the spec...
Thanks, and Got It. This particular column is:
reconciled | boolea
This is a reformulation of an earlier question. I've got a confusing
case of a partial index not working. The column in question is a
not-null boolean, which is false only for the most recent entries into
the table.
# explain analyze select count(vehicleeve0_.VEHICLE_EVENT_ID) as x0_0_
from
Luiz K. Matsumura wrote:
Richard Broersma Jr wrote:
--- "Luiz K. Matsumura" <[EMAIL PROTECTED]> wrote:
CREATE VIEW view1( id, col1, type1, type2) AS
SELECT table1.id,
table1.col1,
CAST( table2.type1 AS CHARACTER( 3 )),
NULL
FROM table1
JOIN table2 ON table2.fk_tabl
21 matches
Mail list logo