Alastair McKinley writes:
> Hi,
>
>
> I have a table that stores a location identifier per person which will be
> appended to many times.
>
> However, for many queries in this system we only need to know the most recent
> location per person, which is limited to about 1000 records.
>
>
> Is th
Alastair McKinley wrote:
> create function latest_record_update() returns trigger as
> $$
> BEGIN
> update location_records set latest_record = false where person_id =
> new.person_id and latest_record is true and id != new.id;
> return new;
> END;
> $$ language plpgsql;
>
> crea
Hi Alastair,
See embedded comments.
On 02/05/18 21:51, Alastair McKinley wrote:
Hi,
I have a table that stores a location identifier per person which will
be appended to many times.
However, for many queries in this system we only need to know the most
recent location per person, which i