>Marc Mamin-2 wrote
>> I would misuse GUC variables for this.
>> (using the functions current_setting and set_config)
>>
>> define a set get and switch fuction (I use operators for better
>> readability)
>> something like:
>>
>> select 'a' ==> 'foo'
>> 'a'
>> select 'b' <==> 'foo'
>> 'a'
>> select
Elliot wrote
> Maybe a custom aggregate that takes the last item in a set?
>
> CREATE OR REPLACE FUNCTION public.last_agg ( anyelement, anyelement )
> RETURNS anyelement LANGUAGE sql IMMUTABLE STRICT AS $$
> SELECT $2;
> $$;
>
> CREATE AGGREGATE public.last (
> sfunc= public
Marc Mamin-2 wrote
> I would misuse GUC variables for this.
> (using the functions current_setting and set_config)
>
> define a set get and switch fuction (I use operators for better
> readability)
> something like:
>
> select 'a' ==> 'foo'
> 'a'
> select 'b' <==> 'foo'
> 'a'
> select <== 'foo'
>
Robert James wrote
> * Finding field x of the _previous_ row that meets a certain criteria
> (which the current row may or may not meet)
> )
This question could be phrased better. I provide an answer to my
interpretation below.
You'll need to play with the frame definition because I don't yet ha
>Von: pgsql-general-ow...@postgresql.org
>[pgsql-general-ow...@postgresql.org]" im Auftrag von "Elliot
>[yields.falseh...@gmail.com]
>Gesendet: Freitag, 25. Oktober 2013 20:33
>
>On 2013-10-25 13:35, Robert James wrote:
>> On 10/25/13, Robert James wrote:
>>> I have a table of (timed) events, a
On 2013-10-25 13:35, Robert James wrote:
On 10/25/13, Robert James wrote:
I have a table of (timed) events, and I'm interested in marking events
whose properties have changed from the previous event.
I believe this can be done with window functions, but I'm not sure
how. What window function
Hello
2013/10/25 Robert James
> On 10/25/13, Tom Lane wrote:
> > Robert James writes:
> >>> (To elaborate, I'm interested in:
> >>> * Finding field x of the _previous_ row
> >>> * Finding field x of the _next_ row
> >>> * Finding field x of the _previous_ row that meets a certain criteria
> >
On 10/25/13, Tom Lane wrote:
> Robert James writes:
>>> (To elaborate, I'm interested in:
>>> * Finding field x of the _previous_ row
>>> * Finding field x of the _next_ row
>>> * Finding field x of the _previous_ row that meets a certain criteria
>>> (which the current row may or may not meet)
>
Robert James writes:
>> (To elaborate, I'm interested in:
>> * Finding field x of the _previous_ row
>> * Finding field x of the _next_ row
>> * Finding field x of the _previous_ row that meets a certain criteria
>> (which the current row may or may not meet)
>> )
> The first two are actually tri
On 10/25/13, Robert James wrote:
> I have a table of (timed) events, and I'm interested in marking events
> whose properties have changed from the previous event.
>
> I believe this can be done with window functions, but I'm not sure
> how. What window function can give me a field from the _previ
I have a table of (timed) events, and I'm interested in marking events
whose properties have changed from the previous event.
I believe this can be done with window functions, but I'm not sure
how. What window function can give me a field from the _previous_
row?
(To elaborate, I'm interested in
11 matches
Mail list logo