Re: Postgres code for a query intermediate dataset

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: Postgres code for a query intermediate dataset
Дата
Msg-id 1410632567941-5818935.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Postgres code for a query intermediate dataset  (Atri Sharma <atri.jiit@gmail.com>)
Ответы Re: Postgres code for a query intermediate dataset  (Atri Sharma <atri.jiit@gmail.com>)
Список pgsql-hackers
Atri Sharma wrote
> On Sat, Sep 13, 2014 at 11:06 PM, Rohit Goyal <

> rhtgyl.87@

> > wrote:
> 
>>
>> Hi All,
>>
>> I want to work on the code of intermediate dataset of select and update
>> query.
>>
>> For example.
>>
>> Rohit's salary has been updated 4 times, so it has 4 different version of
>> salary.
>>
>> I want to select  salary of person named Rohit. Now suppose , in
>> intermediate result, I found 4 different versions of the data. I want to
>> know the code portion which i need to look for working on all 4 versions
>> in
>> dataset. :)
>>
>> Thanks in advance!!
>>
>>
>>
> Not sure what you are looking for, but each update is an insert of a new
> tuple with the new values and marking the old tuple as deleted.
> 
> There is no need for tracking the versions of any changes in data set.
> Each
> update operation leaves only one visible tuple. If the transaction
> commits,
> inserted tuple becomes visible and old row is marked deleted. If the
> transaction rollbacks, only the old tuple shall remain visible.
> -- 
> Regards,
> 
> Atri
> *l'apprenant*

Or rather even if you want to be able to reference the older versions of
that record there is nothing in PostgreSQL to facilitate that. You have to
manually create and manage the data so that you know during what time period
a given record is valid.

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Postgres-code-for-a-query-intermediate-dataset-tp5818931p5818935.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Atri Sharma
Дата:
Сообщение: Re: Postgres code for a query intermediate dataset
Следующее
От: Atri Sharma
Дата:
Сообщение: Re: Postgres code for a query intermediate dataset