[GENERAL] why can't my account be used at wiki.postgresql.org after having registered in www.postgresql.org?

2011-12-14 Thread sunpeng
Hi, I just registered my acount using this url: https://www.postgresql.org/account/signup/, then i use the new account to login www.postgresql.org, everything works well. But when I try to login wiki.postgresql.org using the same account, i got an error: There is no user by the name "myaccount"

Re: [GENERAL] why can't my account be used at wiki.postgresql.org after having registered in www.postgresql.org?

2011-12-14 Thread Raymond O'Donnell
On 14/12/2011 11:05, sunpeng wrote: > Hi, > I just registered my acount using this url: > https://www.postgresql.org/account/signup/, then i use the new account > to login www.postgresql.org , everything > works well. > But when I try to login wiki.postgresql.org >

[GENERAL] Philosophical question

2011-12-14 Thread Andreas
Hi, I asked elsewhere about the best way to store db credentials within a user-session of a web-app. It appeared that it was for everybody but me evident that instead of heaving a db-role+passwd for every user of an application it was better to have just 1 set of db-credentials for the appli

Re: [GENERAL] Philosophical question

2011-12-14 Thread Serge Fonville
Hi, I asked elsewhere about the best way to store db credentials within a > user-session of a web-app. > It appeared that it was for everybody but me evident that instead of > heaving a db-role+passwd for every user of an application it was better to > have just 1 set of db-credentials for the app

Re: [GENERAL] Philosophical question

2011-12-14 Thread Craig Ringer
On 14/12/2011 8:32 PM, Andreas wrote: Hi, I asked elsewhere about the best way to store db credentials within a user-session of a web-app. Where? Link? It appeared that it was for everybody but me evident that instead of heaving a db-role+passwd for every user of an application it was bet

Re: [GENERAL] Philosophical question

2011-12-14 Thread Chris Travers
On Wed, Dec 14, 2011 at 4:32 AM, Andreas wrote: > Hi, > > I asked elsewhere about the best way to store db credentials within a > user-session of a web-app. > > It appeared that it was for everybody but me evident that instead of heaving > a db-role+passwd for every user of an application it was b

Re: [GENERAL] Postgresql connect into windows server

2011-12-14 Thread Yuriy Rusinov
Hello, All ! >> But pg_admin on windows successfully works on both servers. Any ideas ? >>> >>> >>> is a windows firewall blocking incoming connections on port 5432/tcp ? >>> >> >> Possible yes, but which way I have to verify it ? When I add rule for 5432/tcp port, all works fine.

[GENERAL] Copying timeline history file to standby

2011-12-14 Thread senthilnathan
We are using 9.1., We have a set up like a master and 2 standby servers. M -- > S1,S2 . Both standby S1 and S2 share the same archive. Master will have an Virtual IP. Both stand by servers will be replicated using this virtual ip. Assume the master fails,using our heart beat mechanism Virtual IP

Re: [GENERAL] why can't my account be used at wiki.postgresql.org after having registered in www.postgresql.org?

2011-12-14 Thread Tom Lane
sunpeng writes: > I just registered my acount using this url: > https://www.postgresql.org/account/signup/, then i use the new account to > login www.postgresql.org, everything works well. > But when I try to login wiki.postgresql.org using the same account, i got > an error: There is no user

Re: [GENERAL] Controlling complexity in queries

2011-12-14 Thread Merlin Moncure
On Tue, Dec 13, 2011 at 4:27 PM, Jay Levitt wrote: > Merlin Moncure wrote: >> >> Breaking your large queries into functions OTOH can make significant >> changes to the plan, often to the worse. > > > As an end-user, I think this is an area where PostgreSQL could really stand > out (that and the mo

Re: [GENERAL] Philosophical question

2011-12-14 Thread Albe Laurenz
Andreas wrote: > I asked elsewhere about the best way to store db credentials within a > user-session of a web-app. > > It appeared that it was for everybody but me evident that instead of > heaving a db-role+passwd for every user of an application it was better > to have just 1 set of db-credenti

Re: [GENERAL] Philosophical question

2011-12-14 Thread Andreas
Am 14.12.2011 14:28, schrieb Craig Ringer: On 14/12/2011 8:32 PM, Andreas wrote: Hi, I asked elsewhere about the best way to store db credentials within a user-session of a web-app. Where? Link? Well, it was on the general list of php.net. I read your link and understood your not a partic

[GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Carlos Mennens
I'm wanted to find out why is it recommended or even an option to lock tables during a backup of a database? I've never experimented with database backups so I'm only guessing it locks / freezes the data so no changes can be made while the backup is in process, correct? Just curious and wasn't abl

[GENERAL] Cisco Systems fail

2011-12-14 Thread Ray Stell
I've been using a network management tool for a number of years from cisco to manage storage networking (fibre channel). The thing is called Fabric Manager and I was thrilled that they supported pg for the backend when I first installed. However, their latest and greatest is frozen to pg 8.2. Si

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Andy Colson
On 12/14/2011 11:52 AM, Carlos Mennens wrote: I'm wanted to find out why is it recommended or even an option to lock tables during a backup of a database? I've never experimented with database backups so I'm only guessing it locks / freezes the data so no changes can be made while the backup is

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Carlos Mennens
On Wed, Dec 14, 2011 at 1:15 PM, Andy Colson wrote: > Yep, you simply cron a pg_dump.  (dumpall if you want users/roles and all > databases).  No locking needed. So how would one put this in cron if I wanted to run this everyday? 0 * * * * /usr/bin/pg_dumpall > pg_dumpall.$DATE.sql Will that wo

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Andy Colson
On 12/14/2011 12:26 PM, Carlos Mennens wrote: On Wed, Dec 14, 2011 at 1:15 PM, Andy Colson wrote: Yep, you simply cron a pg_dump. (dumpall if you want users/roles and all databases). No locking needed. So how would one put this in cron if I wanted to run this everyday? 0 * * * * /usr/bin/p

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Carlos Mennens
On Wed, Dec 14, 2011 at 1:38 PM, Andy Colson wrote: > this'll run every hour. > >> 0 * * * * /usr/bin/pg_dumpall>  pg_dumpall.$DATE.sql Thank you! > try: > > 0 4 * * * /usr/bin/pg_dumpall>  pg_dumpall.$DATE.sql > > that'll run at 4am every day. When I run the command in my shell (not in Cron),

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Andy Colson
On 12/14/2011 12:54 PM, Carlos Mennens wrote: On Wed, Dec 14, 2011 at 1:38 PM, Andy Colson wrote: this'll run every hour. 0 * * * * /usr/bin/pg_dumpall>pg_dumpall.$DATE.sql Thank you! try: 0 4 * * * /usr/bin/pg_dumpall>pg_dumpall.$DATE.sql that'll run at 4am every day. When I

Re: [GENERAL] why can't my account be used at wiki.postgresql.org after having registered in www.postgresql.org?

2011-12-14 Thread Magnus Hagander
On Wed, Dec 14, 2011 at 16:13, Tom Lane wrote: > sunpeng writes: >>   I just registered my acount using this url: >> https://www.postgresql.org/account/signup/, then i use the new account to >> login www.postgresql.org, everything works well. >>   But when I try to login wiki.postgresql.org using

[GENERAL] Vacuum and Large Objects

2011-12-14 Thread Simon Windsor
Hi I am having problems recovering storage from a Postgres 9.05 database that is used to hold large XML blocks for a week, before they are archived off line. The main tables are partitioned in daily partitions, and these are easy to manage, however the DB keeps growing despite using Vacuum

Re: [GENERAL] Controlling complexity in queries

2011-12-14 Thread Jay Levitt
Merlin Moncure wrote: SQL has a very powerful abstraction feature: it's called a view. Good use of views is a key design feature for complex databases. Functions are generally not a good choice for query abstraction unless: One more: * You want contextual queries. (I guess this is a special

Re: [GENERAL] when was pg_stat_reset() used in my server for the last time

2011-12-14 Thread Marti Raudsepp
On Wed, Dec 14, 2011 at 08:38, AI Rumman wrote: > Is it possible to find out, when was pg_stat_reset() used in my server for > the last time? > I am using Postgresql 9.2 and I need to find out unused index. I assume you mean PostgreSQL 9.1.2 The pg_stat_database system view has a 'stats_reset' c

Re: [GENERAL] Philosophical question

2011-12-14 Thread Chris Angelico
On Thu, Dec 15, 2011 at 4:16 AM, Andreas wrote: > Well, it was on the general list of php.net. > I read your link and understood your not a particular fan of PHP. > I'm not exactly dogmatic about PHP either. It's just the first approach to > the web-app topic for me. One has to start somewhere.  

Re: [GENERAL] Philosophical question

2011-12-14 Thread David Owen
On Wed, 14 Dec 2011, Andreas wrote: Hi, I asked elsewhere about the best way to store db credentials within a user-session of a web-app. You might give this a read: http://database-programmer.blogspot.com/2009/02/comprehensive-database-security-model.html It goes through how using a DB use

Re: [GENERAL] Controlling complexity in queries

2011-12-14 Thread Alban Hertroys
>>> [1] Since this is my current favorite problem, the pathological case is: >>> >>> select questions.id >>> from questions >>> join ( >>> select u.id >>> from users as u >>> group by u.id >>> ) as s >>> on s.id = questions.user_id >>> where questions.id = 1; >>> >>> With users.id as a primary

Re: [GENERAL] Philosophical question

2011-12-14 Thread Leif Biberg Kristensen
Onsdag 14. desember 2011 22.21.04 skrev Chris Angelico : > The biggest problem with PHP, imho, is actually that it's so easy to > use. Anyone can get a WYSIWYG editor, save as HTML, and have a web > page... and then all you need to do is rename it to ".php" and put > some special tags in it, and l

Re: [GENERAL] Philosophical question

2011-12-14 Thread Chris Travers
This is somewhat of a diversion but On Wed, Dec 14, 2011 at 4:25 PM, Leif Biberg Kristensen wrote: >  Onsdag 14. desember 2011 22.21.04 skrev Chris Angelico : >> The biggest problem with PHP, imho, is actually that it's so easy to >> use. Anyone can get a WYSIWYG editor, save as HTML, and hav

Re: [GENERAL] Vacuum and Large Objects

2011-12-14 Thread Craig Ringer
On 12/15/2011 04:01 AM, Simon Windsor wrote: Hi I am having problems recovering storage from a Postgres 9.05 database that is used to hold large XML blocks for a week, before they are archived off line. The main tables are partitioned in daily partitions, and these are easy to manage, howe

Re: [GENERAL] Philosophical question

2011-12-14 Thread Craig Ringer
On 12/15/2011 01:16 AM, Andreas wrote: Am 14.12.2011 14:28, schrieb Craig Ringer: On 14/12/2011 8:32 PM, Andreas wrote: Hi, I asked elsewhere about the best way to store db credentials within a user-session of a web-app. Where? Link? Well, it was on the general list of php.net. I read yo

Re: [GENERAL] Philosophical question

2011-12-14 Thread Edson Richter
Em 14/12/2011 22:25, Leif Biberg Kristensen escreveu: Onsdag 14. desember 2011 22.21.04 skrev Chris Angelico : The biggest problem with PHP, imho, is actually that it's so easy to use. Anyone can get a WYSIWYG editor, save as HTML, and have a web page... and then all you need to do is rename i

Re: [GENERAL] Controlling complexity in queries

2011-12-14 Thread Jay Levitt
Alban Hertroys wrote: select questions.id from questions join ( select u.id from users as u group by u.id ) as s on s.id = questions.user_id where questions.id = 1; You could write that as: select questions.id from questions as q where exists (select 1 from users as u where u.id = q.user_id

Re: [GENERAL] Philosophical question

2011-12-14 Thread Chris Angelico
On Thu, Dec 15, 2011 at 11:25 AM, Leif Biberg Kristensen wrote: >  Onsdag 14. desember 2011 22.21.04 skrev Chris Angelico : >> The biggest problem with PHP, imho, is actually that it's so easy to >> use. Anyone can get a WYSIWYG editor, save as HTML, and have a web >> page... and then all you need

Re: [GENERAL] Philosophical question

2011-12-14 Thread Darren Duncan
A practice I like that I've seen done for a federal-government scale database program is to have each person using the application to login to the database using their own temporary database user. How it works is that the database has a users table similar to as if the application was managing

[GENERAL] Correct syntax to create partial index on a boolean column

2011-12-14 Thread Mike Christensen
For the boolean column Foo in Table1, if I want to index all values of TRUE, is this syntax correct? CREATE INDEX IDX_MyIndex ON Table1(Foo) WHERE Foo; The query: SELECT * FROM Table1 WHERE Foo; should use the index, and: SELECT * FROM Table1 WHERE NOT Foo; should not, correct? I just want t

Re: [GENERAL] Philosophical question

2011-12-14 Thread Darren Duncan
Darren Duncan wrote: A practice I like that I've seen done for a federal-government scale database program is to have each person using the application to login to the database using their own temporary database user. How it works is that the database has a users table similar to as if the app

Re: [GENERAL] Philosophical question

2011-12-14 Thread Chris Travers
On Wed, Dec 14, 2011 at 8:14 PM, Chris Angelico wrote: >> In my opinion, that's a pretty elitistic view. Certainly, that's one way of >> writing PHP, but it isn't the only one. Quite a few of us have started with >> something like what you've outlined here, but have long ago moved on to more >> m

Re: [GENERAL] Philosophical question

2011-12-14 Thread Chris Angelico
On Thu, Dec 15, 2011 at 4:23 PM, Chris Travers wrote: > So the problem is hardly limited to PHP. Oh, it definitely is not. Really, it's a problem with human beings who think they're programmers. It just seems to occur more frequently in some languages than others. ChrisA -- Sent via pgsql-gene

Re: [GENERAL] Correct syntax to create partial index on a boolean column

2011-12-14 Thread Mike Christensen
> For the boolean column Foo in Table1, if I want to index all values of > TRUE, is this syntax correct? > > CREATE INDEX IDX_MyIndex ON Table1(Foo) WHERE Foo; > > The query: > > SELECT * FROM Table1 WHERE Foo; > > should use the index, and: > > SELECT * FROM Table1 WHERE NOT Foo; > > should not, c

[GENERAL] question about \encoding option of psql

2011-12-14 Thread Xiaobo Gu
Hi, I know \encoding is a meta command to set client encoding on psql prompt, but how can I set it inside the psql command line which will be called inside shell scripts, psql -h 192.168.72.7 -U gpadmin -w -d miner_demo -c"\copy demo.store to 'd:\store.csv' with csv header" How can I set the en

Re: [GENERAL] question about \encoding option of psql

2011-12-14 Thread John R Pierce
On 12/14/11 10:12 PM, Xiaobo Gu wrote: I know \encoding is a meta command to set client encoding on psql prompt, but how can I set it inside the psql command line which will be called inside shell scripts, psql -h 192.168.72.7 -U gpadmin -w -d miner_demo -c"\copy demo.store to 'd:\store.csv' wit

Re: [GENERAL] Correct syntax to create partial index on a boolean column

2011-12-14 Thread Mike Christensen
On Wed, Dec 14, 2011 at 9:54 PM, Mike Christensen wrote: >> For the boolean column Foo in Table1, if I want to index all values of >> TRUE, is this syntax correct? >> >> CREATE INDEX IDX_MyIndex ON Table1(Foo) WHERE Foo; >> >> The query: >> >> SELECT * FROM Table1 WHERE Foo; >> >> should use the i

Re: [GENERAL] Correct syntax to create partial index on a boolean column

2011-12-14 Thread Alban Hertroys
On 15 Dec 2011, at 5:43, Mike Christensen wrote: > For the boolean column Foo in Table1, if I want to index all values of > TRUE, is this syntax correct? > > CREATE INDEX IDX_MyIndex ON Table1(Foo) WHERE Foo; > > The query: > > SELECT * FROM Table1 WHERE Foo; > > should use the index, and: >