Re: [GENERAL] select max from subquery

2009-02-15 Thread searchelite



Oleg Bartunov wrote:
> 
> yOn Sat, 14 Feb 2009, searchelite wrote:
> 
>>
>> Dear All
>>
>> i gave this kind of query
>>
>> select max(foo) from (select some statement) as foo
>>
>> but it gave me this error
>> ERROR:  function max(record) does not exist
>>
>>
>> any help how i can select max value from suqbuery in main query
>>
> 
> like this:
> 
> select max(foo.qq) from (select 1 as qq) as foo;
>^^ ^^
> 
>> thanks
>>
> 
>   Regards,
>   Oleg
> _
> Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
> Sternberg Astronomical Institute, Moscow University, Russia
> Internet: o...@sai.msu.su, http://www.sai.msu.su/~megera/
> phone: +007(495)939-16-83, +007(495)939-23-83
> 
> -- 
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
> 
> 

thanks oleg for your reply..that's what i need ;)

-- 
View this message in context: 
http://www.nabble.com/select-max-from-subquery-tp22011562p22021619.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] select max from subquery

2009-02-14 Thread searchelite

Dear All

i gave this kind of query

select max(foo) from (select some statement) as foo

but it gave me this error
ERROR:  function max(record) does not exist


any help how i can select max value from suqbuery in main query

thanks
-- 
View this message in context: 
http://www.nabble.com/select-max-from-subquery-tp22011562p22011562.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] auto insert data every one minute

2009-01-17 Thread searchelite



Tino Wildenhain wrote:
> 
> 
> I wonder what is you complete problem? It seems all the advices given
> so far are shots-in-the-dark. Could you perhaps expand a bit?
> 
> Also for sophisticated solution, if you stick to windows you might
> want to consider something different then just pure CMD, say some
> scripting language to support.
> 
> Tino
> 
> 

I have pre-recorded gps data in .sql insert format..for simulate real-time
tracking, i want to insert the data in let say every one minute

-- 
View this message in context: 
http://www.nabble.com/auto-insert-data-every-one-minute-tp20027811p21524797.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] auto insert data every one minute

2009-01-03 Thread searchelite



Daniel Verite wrote:
> 
>   searchelite wrote:
> 
> 
> How about using pg_sleep ?
> 
> INSERT  ;
> COMMIT;
> SELECT pg_sleep(60);
> 
> INSERT...;
> COMMIT;
> SELECT pg_sleep(60);
> 
> 
> 
> 


i can use pg_sleep..but i have thousands of data to be inserted..is there
any better way using pg_sleep?

-- 
View this message in context: 
http://www.nabble.com/auto-insert-data-every-one-minute-tp20027811p21263763.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] auto insert data every one minute

2008-10-17 Thread searchelite

Hi all..

I have an sql script consists of insert statement data. I want to insert
every row of data every one minute. How can i do that using batch file in
windows

Thank you
-- 
View this message in context: 
http://www.nabble.com/auto-insert-data-every-one-minute-tp20027811p20027811.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Federated Server

2008-10-06 Thread searchelite

Hi all..

Is there any capability of PostgreSQL to become a federated server?

Thanks
-- 
View this message in context: 
http://www.nabble.com/Federated-Server-tp19850547p19850547.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] mirroring table

2008-08-23 Thread searchelite



Craig Ringer wrote:
> 
> It sounds like what you want is to have a table that contains a full
> history of records, plus another table that contains only the records
> from the first table that were inserted/updated today.
> 
> If that is what you mean, there are several ways to do it, with
> different advantages and disadvantages.
> 
> You can treat your smaller table as a materialized view, where you use
> triggers to update it and run a batch job (with cron or similar) every
> night to clear it.
> 
> Another way is to make it a normal view, possibly with rules in place to
> make it updatable. You could use a partial index on the primary key
> that's restricted to tuples inserted/updated more recently than a given
> date to improve performance of the view.
> 
> For that matter, you could even use table partitioning to do it, though
> this would involve a bit of manual (or scripted) maintenance.
> 
> Anyway, this is all speculation if I've missed the point of your
> question. If I'm mistaken about what you meant, perhaps you could
> explain in a little more detail?
> 
> --
> Craig Ringer
> 
> -- 
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
> 
> 

Thanks for the reply Craig..this is answered my question...

thanks again

-- 
View this message in context: 
http://www.nabble.com/mirroring-table-tp18961792p19119465.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] mirroring table

2008-08-13 Thread searchelite

Hi all..how can i mirroring table in postgresql?
Let say i have a transaction table updated everyday, i want to mirror that
table so that the other table only store the latest updated day records..
I hope you can understand my question..

Thanks in advance
-- 
View this message in context: 
http://www.nabble.com/mirroring-table-tp18961792p18961792.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general