Re: [GENERAL] Run "postgresql\9.0\data" on a RAID-1 disk on my Local Area Network (LAN)

2010-11-07 Thread Sachin Srivastava
Hello, On Nov 7, 2010, at 1:22 PM, Anders Söderman wrote: > Hello – I´m trying to install PostgreSQL and PostGIS ”asking” PostgreSQL to > store data on my new Netgear NAS Duo LAN-disk in a Windows XP sp2 > environment. > > In the Setup Wizard I accept C:\Program\PostgreSQL\9.0 > and I change

Re: [GENERAL] Run "postgresql\9.0\data" on a RAID-1 disk on my Local Area Network (LAN)

2010-11-07 Thread Anders Söderman
Thanks for your help, Magnus. This problem was way over my head, so I´m glad I can leave it behind. I´ll will try to secure the PostgreSQL/PostGIS database using ordinary backup methods. Regards Anders Söderman Stockholm Sweden -Original Message- From: Magnus Hagander [mailto:mag...@hag

Re: [GENERAL] Libpq is very slow on windows but fast on linux.

2010-11-07 Thread Rob Brown-Bayliss
Hi No Joy. The tcp window stuff didn't make any difference. I tried the unscientific speedtest.net to a server in Canada and all 3 machines (several times each)(. Linux, XP and Vista. The results are all too close to call. Yet psql or pgadmin are 4 or 5 times slower on the windows machines.

Re: [GENERAL] Libpq is very slow on windows but fast on linux.

2010-11-07 Thread Craig Ringer
On 07/11/10 09:13, Rob Brown-Bayliss wrote: > Ok, So I did that, in the windows capture file are many many lines of > Red text on a black background, I assume thats a bad thing. If you examine the packet it'll say "invalid checksum". This will be because your network card is doing TCP checksum off

Re: [GENERAL] Finding rank of a single record

2010-11-07 Thread Rob Sargent
Alexander Farber wrote: And: pref=> select * from ( select u.id, u.first_name, u.city, m.money, rank() over (order by money desc) from pref_users u, pref_money m where m.yw=to_char(current_timestamp, '-IW') ) ar where ar.id='OK1382399

Re: [GENERAL] Libpq is very slow on windows but fast on linux.

2010-11-07 Thread Rob Brown-Bayliss
Thanks, I will a look at that latter, but I am not too hopeful as I get the same results on Vista as XP. One thought that has occurred to me is could it be libpq.dll versions? I am not able to test until later on today, but the server is postgresql 8.3 and the XP machine is using libpq frim the

Re: [GENERAL] function with multiple return values

2010-11-07 Thread Pavel Stehule
2010/11/7 Scott Serr : > On 11/07/2010 08:53 AM, Tom Lane wrote: >> >> Andreas Kretschmer  writes: >>> >>> Scott Serr  wrote: Ideas on how to uniquely name the first and second set of "perc, entry_date"? >>> >>> You can use alias-names for the 2 queries, like: >>> test=*# select foob

Re: [GENERAL] function with multiple return values

2010-11-07 Thread Scott Serr
On 11/07/2010 08:53 AM, Tom Lane wrote: Andreas Kretschmer writes: Scott Serr wrote: Ideas on how to uniquely name the first and second set of "perc, entry_date"? You can use alias-names for the 2 queries, like: test=*# select foobar.a as x, foobar.b as y, bar.* from (select * from foo()) f

Re: [GENERAL] Finding rank of a single record

2010-11-07 Thread Alexander Farber
And: pref=> select * from ( select u.id, u.first_name, u.city, m.money, rank() over (order by money desc) from pref_users u, pref_money m where m.yw=to_char(current_timestamp, '-IW') ) ar where ar.id='OK138239987797'; works, but deliver

Re: [GENERAL] Finding rank of a single record

2010-11-07 Thread Alexander Farber
Sorry Rob, but it fails with: pref=> select * from ( select u.id, u.first_name, u.city, m.money, rank() over (order by money desc) from pref_users u, pref_money m where m.yw=to_char(current_timestamp, '-IW') ) all_ranks ar where ar.id='OK

Re: [GENERAL] function with multiple return values

2010-11-07 Thread Andreas Kretschmer
Tom Lane wrote: > Andreas Kretschmer writes: > > Scott Serr wrote: > >> Ideas on how to uniquely name the first and second set of "perc, > >> entry_date"? > > > You can use alias-names for the 2 queries, like: > > > test=*# select foobar.a as x, foobar.b as y, bar.* from (select * from > >

Re: [GENERAL] function with multiple return values

2010-11-07 Thread Tom Lane
Andreas Kretschmer writes: > Scott Serr wrote: >> Ideas on how to uniquely name the first and second set of "perc, >> entry_date"? > You can use alias-names for the 2 queries, like: > test=*# select foobar.a as x, foobar.b as y, bar.* from (select * from foo()) > foobar, (select * from foo()

Re: [GENERAL] It is possible to update more than 1 table in the same update statement?

2010-11-07 Thread Scott Ribe
On Nov 7, 2010, at 8:37 AM, Andre Lopes wrote: > The only way I can guarantee a transaction is in a Function or there are > other ways? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0

Re: [GENERAL] It is possible to update more than 1 table in the same update statement?

2010-11-07 Thread Andre Lopes
The only way I can guarantee a transaction is in a Function or there are other ways? Best Regards, On Sun, Nov 7, 2010 at 3:22 PM, Szymon Guz wrote: > > > On 7 November 2010 16:20, Andre Lopes wrote: > >> Sorry for not explain well. >> >> I mean update more than one table at the same time wi

Re: [GENERAL] Run "postgresql\9.0\data" on a RAID-1 disk on my Local Area Network (LAN)

2010-11-07 Thread Magnus Hagander
2010/11/7 Anders Söderman : > Hello – I´m trying to install PostgreSQL and PostGIS ”asking” PostgreSQL to > store data on my new Netgear NAS Duo LAN-disk in a Windows XP sp2 >  environment. Note that storing the PostgreSQL data on a SMB mount is *not* safe and not supported. I don't know how your

Re: [GENERAL] It is possible to update more than 1 table in the same update statement?

2010-11-07 Thread Szymon Guz
On 7 November 2010 16:20, Andre Lopes wrote: > Sorry for not explain well. > > I mean update more than one table at the same time with something like > this: > > update table1, table2 > set > table1.f1 = 'aaa', > table2.date = '2001-01-01' > where > table1.id = 'x1' and table2.id = 'x1' > > Somet

Re: [GENERAL] Looking for a Generic lightweight job queueing (stack) implementation.

2010-11-07 Thread Sergey Konoplev
On 7 November 2010 15:51, Allan Kamau wrote: > Hi, > I am looking for an easy to use job queueing system. Where a job is a PgQ may be? http://wiki.postgresql.org/wiki/PGQ_Tutorial > > Allan. > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your sub

Re: [GENERAL] It is possible to update more than 1 table in the same update statement?

2010-11-07 Thread Scott Ribe
On Nov 7, 2010, at 8:20 AM, Andre Lopes wrote: > I mean update more than one table at the same time with something like this: Why? Use a transaction. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] It is possible to update more than 1 table in the same update statement?

2010-11-07 Thread Andre Lopes
Sorry for not explain well. I mean update more than one table at the same time with something like this: update table1, table2 set table1.f1 = 'aaa', table2.date = '2001-01-01' where table1.id = 'x1' and table2.id = 'x1' Something like this is possible? It is the best way to do it? Best Regards

Re: [GENERAL] It is possible to update more than 1 table in the same update statement?

2010-11-07 Thread Scott Ribe
On Nov 7, 2010, at 7:58 AM, Andre Lopes wrote: > need to update various tables in the same update. It is possible to do it? Transactions??? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-general mailing list (pgsql-general@po

Re: [GENERAL] It is possible to update more than 1 table in the same update statement?

2010-11-07 Thread Szymon Guz
On 7 November 2010 15:58, Andre Lopes wrote: > Hi, > > I need to update various tables in the same update. It is possible to do > it? > > Best Regards, > > Could you describe a little bit more what you want to achieve? regards Szymon

[GENERAL] It is possible to update more than 1 table in the same update statement?

2010-11-07 Thread Andre Lopes
Hi, I need to update various tables in the same update. It is possible to do it? Best Regards,

Re: [GENERAL] Need magic to clean strings from unconvertible UTF8

2010-11-07 Thread Andreas
Am 07.11.2010 06:54, schrieb John R Pierce: On 11/06/10 9:35 PM, Andreas wrote: somehow there have unconvertible characters sneaked into my DB. Very probaply they came in via Imports from MS-Access. Access doesn't complain but when I try to export stuff with pgAdmin to csv I get an error that

[GENERAL] Looking for a Generic lightweight job queueing (stack) implementation.

2010-11-07 Thread Allan Kamau
Hi, I am looking for an easy to use job queueing system. Where a job is a record in a table and several aggressive worker processes (from multiple instances of a client application) each can take a single job at a time. A job may only be collected only once. The job queue will act like a stack and

Re: [GENERAL] function with multiple return values

2010-11-07 Thread Andreas Kretschmer
Scott Serr wrote: > I've created the following function: > > CREATE OR REPLACE FUNCTION latest ( lot_id int4, > condition text, OUT perc smallint, OUT entry_date date ) > RETURNS SETOF record AS > ' > BEGIN >RETURN QUERY SELECT t1.perc, t1.entry_date > FROMt1, t2 > W

[GENERAL] Run "postgresql\9.0\data" on a RAID-1 disk on my Local Area Network (LAN)

2010-11-07 Thread Anders Söderman
Hello – I´m trying to install PostgreSQL and PostGIS ”asking” PostgreSQL to store data on my new Netgear NAS Duo LAN-disk in a Windows XP sp2 environment. In the Setup Wizard I accept C:\Program\PostgreSQL\9.0 and I change C:\Program\PostgreSQL\9.0\data to either //R1/aa_db/PostgreSQL\9.0\data

[GENERAL] function with multiple return values

2010-11-07 Thread Scott Serr
I've created the following function: CREATE OR REPLACE FUNCTION latest ( lot_id int4, condition text, OUT perc smallint, OUT entry_date date ) RETURNS SETOF record AS ' BEGIN RETURN QUERY SELECT t1.perc, t1.entry_date FROMt1, t2 WHERE t1.condition_id=t2.id and t1.lo