Tom Lane writes:
> Some people seem to think that the system should try to intuit
> those rules for them, but I don't believe that's either possible
> or desirable. The entire point of a view is that it's not an
> exact image of the underlying data, so how is a machine going to
> figure out what
Hi.
I've got a postgres system that keeps going into recovery mode. I
can't really find any docs on this. All of the postgres processes
will be in the STOP state and when I try to connect it will say "The
database is in recovery mode".
I suspect there is a query that is causing it to crash in
On Fri, 4 Aug 2000, Sandis wrote:
> I do it like this:
>
> SELECT datums FROM jaunumi
> WHERE date_part('year',datetime(datums)) = '2000' AND
> date_part('month',datetime(datums)) = '08';
>
> Where datums is a timestamp field.
Or (in 7.0):
SELECT datums FROM jaunum WHERE to_c
This is not exactly what the original question was about. You select the month
is one specific year only.
What you do it however easier achieved by:
SELECT datums FROM jaunumi WHERE date_trunc('month', datums) = '2000-08-01';
datetime is an type full of tricks. :-)
Daniel
>>>"Sandis" said:
Hi,
When I saw cross tab, I realized that I'd done this before.
If you know what your keys are ahead of time, you can write the query.
Otherwise, you can write a program go generate the query by looking at the
distinct list of keys and generating code as follows. The code generator
would only h
Hello,
I have the following tables in my database
Painter(id integer, uri varchar(256))
paints(id1 integer, id2 integer)
in order to speed up the join (select * from painter, paints where
painter.id= paints.id1) between these two tables I have created indexes
on the field painter.id and/or pa
I get unexpected query strategy when using coalesce.
Good:
-
explain update zzz set
b = (select x.newVal from zzz_xref x where x.oldVal = zzz.b);
NOTICE: QUERY PLAN:
Seq Scan on zzz (cost=0.00..20.00 rows=1000 width=10)
SubPlan
-> Index Scan using zzz_xref_ix2 on zzz_xref
I do it like this:
SELECT datums FROM jaunumi
WHERE date_part('year',datetime(datums)) = '2000' AND
date_part('month',datetime(datums)) = '08';
Where datums is a timestamp field.
Regards,
Sandis Jerics
www.mediaparks.lv
> This might seem rather silly, but could you simply do some
[EMAIL PROTECTED] wrote:
>
> Is there any way to get table T3 (below) from T1 and T2 using SQL (select, view,
>etc)?
>
> T3 is basically all INDEX values from T1 matched to IND from T2 with the
>corresponding KEY/VALUE pairs transposed from rows to columns.
>
> ---
> |INDEX| (T1)
>