On 10/20/12 10:21 AM, Jan Mechtel wrote:
Our webhoster moved us to a 64Bit CentOS. I installed postgresql-9.1.3
from source.
instead, you probably should have installed postgres from the
yum.postgresql.com repository.
something like this...
# rpm -Uvh
http://yum.postgresql.org/9.1/redhat
Thalis Kalfigkopoulos wrote:
On Sat, Oct 20, 2012 at 8:02 AM, Raymond O'Donnell wrote:
On 20/10/2012 11:54, ochaussavoine wrote:
I have a table 'tmvt' with a field 'created' in the row, and would like to
compute the difference between successive rows. The solution I found is:
I think you can
Thanks for the quick reply,
This could indeed be a solution since the webhosting migrated the old
folder I used for installation on 32bit.
I am not very familar with linux, I'd like to ask for two clarifications:
>If so, you should start from a fresh source tree; or run "make clean" or
>"make m
Our webhoster moved us to a 64Bit CentOS. I installed postgresql-9.1.3 from
source.
I run into trouble when trying to create the tablefunc extension
b2blogin_mailrocket=# create extension tablefunc;
ERROR: could not load library
"/home/b2blogin/lib/postgresql/tablefunc.so":
/home/b2blogin/lib/po
Виктор Егоров wrote:
2012/10/20 Berend Tober :
Your suggestion almost worked as is for this, except that you have to note
that reading for meter #2 and meter #3 overlap ...
You can do
… OVER(PARTITION BY electric_meter_pk ORDER BY reading_date)
to split you data by meter.
That looks like
On Sat, Oct 20, 2012 at 11:00 AM, Jan Mechtel wrote:
> Thanks for the quick reply,
>
> This could indeed be a solution since the webhosting migrated the old folder
> I used for installation on 32bit.
Sorry, I don't really know what this means. They just copied the
folder, or the migration was mo
Thanks a lot, this worked. I read to detail the tablefunc.so and then go to
the postgres-9.1.3/contrib/ and call make + make install there.
On 20 October 2012 20:02, Jan Mechtel wrote:
> Thanks for the quick reply,
> This could indeed be a solution since the webhosting migrated the old
> folder
Thanks for the quick reply,
This could indeed be a solution since the webhosting migrated the old
folder I used for installation on 32bit.
I am not very familar with linux, I'd like to ask for two clarifications:
>If so, you should start from a fresh source tree; or run "make clean" or
>"make mai
On Sat, Oct 20, 2012 at 10:33 AM, Jan Mechtel wrote:
> Our webhoster moved us to a 64Bit CentOS. I installed postgresql-9.1.3 from
> source.
Did you also install contrib from the same source?
>
> I run into trouble when trying to create the tablefunc extension
>
> b2blogin_mailrocket=# create ex
2012/10/20 Berend Tober :
> Your suggestion almost worked as is for this, except that you have to note
> that reading for meter #2 and meter #3 overlap (I briefly owned two houses),
> and that seemed to confuse the lag() function:
>
> SELECT
> electric_meter_pk,
> lag(reading_date)
> OVER(
Our webhoster moved us to a 64Bit CentOS. I installed postgresql-9.1.3 from
source.
I run into trouble when trying to create the tablefunc extension
b2blogin_mailrocket=# create extension tablefunc;
ERROR: could not load library
"/home/b2blogin/lib/postgresql/tablefunc.so":
/home/b2blogin/lib/po
On 20/10/2012 17:50, Tom Lane wrote:
> "Raymond O'Donnell" writes:
>> On 20/10/2012 17:23, Tom Lane wrote:
>>> FWIW, Postgres is reasonably smart about the case of multiple window
>>> functions with identical window definitions --- once you've got one
>>> lag() in the query, adding more isn't goin
Berend Tober wrote:
Raymond O'Donnell wrote:
On 20/10/2012 17:02, Berend Tober wrote:
Thalis Kalfigkopoulos wrote:
How would you get the previous reading (and perhaps the
previous read
date) to also appear ...
Just include them in the SELECT:
Well, that is surprisingly easy!
How about this
"Raymond O'Donnell" writes:
> On 20/10/2012 17:23, Tom Lane wrote:
>> FWIW, Postgres is reasonably smart about the case of multiple window
>> functions with identical window definitions --- once you've got one
>> lag() in the query, adding more isn't going to cost much.
> Out of curiosity, would
On Sun, Oct 21, 2012 at 3:29 AM, Raymond O'Donnell wrote:
> On 20/10/2012 17:23, Tom Lane wrote:
>> Having said that, they are pretty expensive. I tend to agree that doing
>> the processing on the application side might be faster --- but only if
>> you've got a place to put such code there. If y
Raymond O'Donnell wrote:
On 20/10/2012 17:02, Berend Tober wrote:
Thalis Kalfigkopoulos wrote:
How would you get the previous reading (and perhaps the previous read
date) to also appear ...
Just include them in the SELECT:
Well, that is surprisingly easy!
How about this then: the table in
On 20/10/2012 17:23, Tom Lane wrote:
> Chris Angelico writes:
>> To be quite honest, I would simply read the table directly and then do
>> the processing in an application language :) But two window functions
>> should do the trick. Whether or not it's actually more efficient that
>> way is anothe
Chris Angelico writes:
> To be quite honest, I would simply read the table directly and then do
> the processing in an application language :) But two window functions
> should do the trick. Whether or not it's actually more efficient that
> way is another question.
FWIW, Postgres is reasonably s
On 20/10/2012 17:02, Berend Tober wrote:
> Thalis Kalfigkopoulos wrote:
>> SELECT current_meter_reading - lag(current_meter_reading) OVER(ORDER
>> BY current_reading_date) AS kWh_diff, extract('days' FROM
>> current_reading_date - lag(current_reading_date) OVER(ORDER BY
>> current_reading_date)) as
Thalis Kalfigkopoulos wrote:
SELECT current_meter_reading - lag(current_meter_reading) OVER(ORDER
BY current_reading_date) AS kWh_diff, extract('days' FROM
current_reading_date - lag(current_reading_date) OVER(ORDER BY
current_reading_date)) as num_service_days FROM mytable;
How would you get t
> What about if there is more than one column you want the difference for (...
> coincidentally I am writing a article on this topic right now! ...), say a
> table which is used to record a metered quantity at not-quite regular
> intervals:
>
> CREATE TABLE electricity
> (
> current_reading_date
On Sun, Oct 21, 2012 at 2:30 AM, Berend Tober wrote:
> What about if there is more than one column you want the difference for (...
> coincidentally I am writing a article on this topic right now! ...), say a
> table which is used to record a metered quantity at not-quite regular
> intervals:
> ..
Thalis Kalfigkopoulos wrote:
On Sat, Oct 20, 2012 at 8:02 AM, Raymond O'Donnell wrote:
On 20/10/2012 11:54, ochaussavoine wrote:
I have a table 'tmvt' with a field 'created' in the row, and would like to
compute the difference between successive rows. The solution I found is:
I think you can
On Sat, Oct 20, 2012 at 8:02 AM, Raymond O'Donnell wrote:
> On 20/10/2012 11:54, ochaussavoine wrote:
>> Hi,
>> I have a table 'tmvt' with a field 'created' in the row, and would like to
>> compute the difference between successive rows. The solution I found is:
>>
>
> I think you can do it with a
On 20/10/2012 11:54, ochaussavoine wrote:
> Hi,
> I have a table 'tmvt' with a field 'created' in the row, and would like to
> compute the difference between successive rows. The solution I found is:
>
> It is complicate and very long to perform. The problem could be simply
> solved with MySql by
Hi,
I have a table 'tmvt' with a field 'created' in the row, and would like to
compute the difference between successive rows. The solution I found is:
It is complicate and very long to perform. The problem could be simply
solved with MySql by creating a new field and updating it using a statement
27 matches
Mail list logo