Re: [GENERAL] returns numbers of record

2008-12-03 Thread Enrico Pirozzi
No I'm looking something else, as I wrote above :) Regards Enrico 2008/12/3 justin [EMAIL PROTECTED]: Select Count(*) from (query) is what i believe you are looking for see http://www.postgresql.org/docs/8.3/interactive/tutorial-agg.html Enrico Pirozzi wrote: Hi all, does it exists a

[GENERAL] concurrent users

2008-12-03 Thread IPS
Dear All,I am planning to migrate my database from Oracle 10g to Postgre SQL. The database in Oracle currently have about 21 million records and about 2 million new record are getting addedevery month. I have few queries:a. I get the data from user in excel/csv file (maximum 13 records per

Re: [GENERAL] concurrent users

2008-12-03 Thread Dave Page
On Wed, Dec 3, 2008 at 10:03 AM, IPS [EMAIL PROTECTED] wrote: c. In orcale jobs are scheduled and executed in the database directly. In postgre no such facility is available. I need to run a job every 2 minutes (24 X 7 operations). pgAgent? http://www.pgadmin.org/download/pgagent.php --

Re: [GENERAL] concurrent users

2008-12-03 Thread Magnus Hagander
IPS wrote: Dear All, I am planning to migrate my database from Oracle 10g to Postgre SQL. The database in Oracle currently have about 21 million records and about 2 million new record are getting added every month. I have few queries: a. I get the data from user in excel/csv file (maximum

Re: [GENERAL] returns numbers of record

2008-12-03 Thread Richard Huxton
Enrico Pirozzi wrote: Hi all, does it exists a way to know how many records a query returns? Not without fetching the rows. If you're not using a cursor then all the rows will be fetched anyway and whatever library you're using will almost certainly have a pg_numrows() function or some such.

Re: [GENERAL] Corruption in postgres 7.4 on solaris 2.9.

2008-12-03 Thread Gary Schlachter
Straight 7.4. No dot release. I do not doubt this could be a problem within the version I am using. However, I am looking for a way to correct/recover the database. Scott Marlowe wrote: On Tue, Dec 2, 2008 at 2:46 PM, Gary Schlachter [EMAIL PROTECTED] wrote: I am running postgres

Re: [GENERAL] Corruption in postgres 7.4 on solaris 2.9.

2008-12-03 Thread Alvaro Herrera
Gary Schlachter escribió: Straight 7.4. No dot release. I do not doubt this could be a problem within the version I am using. However, I am looking for a way to correct/recover the database. Update to 7.4.latest, and _then_ try to start the database. -- Alvaro Herrera

Re: [GENERAL] Corruption in postgres 7.4 on solaris 2.9.

2008-12-03 Thread Scott Marlowe
On Wed, Dec 3, 2008 at 6:25 AM, Gary Schlachter [EMAIL PROTECTED] wrote: Straight 7.4. No dot release. I do not doubt this could be a problem within the version I am using. However, I am looking for a way to correct/recover the database. Wow. you really need to update to the latest

Re: [GENERAL] pg_get_serial_sequence Strangeness/Unreliable?

2008-12-03 Thread Jeff MacDonald
ALTER SEQUENCE OWNED BY worked! Thanks folks. jeff. On 26-Nov-08, at 1:04 PM, Alvaro Herrera wrote: Jeff MacDonald wrote: Hi Tom, so far as I know the table owns the serial in so much as when i do a \d of the table it says this status_id | integer | not null default

[GENERAL] Limit on number of databases in a Cluster ?

2008-12-03 Thread Josh Harrison
Hi, 1. Is there a limit on the number of databases that can be in a single postgres cluster? 2. Is there any performance impacts associated with having too many databases in a cluster? 3. Is there a good magical number for this limit ? Thanks Josh

[GENERAL] restored over postgres database

2008-12-03 Thread Kevin Duffy
Hello: On a newly installed PostgreSQL server I made the mistake of restoring over the postgres database. Which I made me feel very silly and brought up a couple of questions. a) What is the postgres database used for? b) How can I restore the postgres database to a pristine

Re: [GENERAL] restored over postgres database

2008-12-03 Thread Scott Marlowe
On Wed, Dec 3, 2008 at 9:38 AM, Kevin Duffy [EMAIL PROTECTED] wrote: Hello: On a newly installed PostgreSQL server I made the mistake of restoring over the postgres database. Which I made me feel very silly and brought up a couple of questions. a) What is the postgres database

Re: [GENERAL] Limit on number of databases in a Cluster ?

2008-12-03 Thread Scott Marlowe
On Wed, Dec 3, 2008 at 8:43 AM, Josh Harrison [EMAIL PROTECTED] wrote: Hi, 1. Is there a limit on the number of databases that can be in a single postgres cluster? No. I'm sure there's a practical limit into the thousands where things start to get slower. 2. Is there any performance

Re: [GENERAL] restored over postgres database

2008-12-03 Thread Bill Moran
In response to Scott Marlowe [EMAIL PROTECTED]: On Wed, Dec 3, 2008 at 9:38 AM, Kevin Duffy [EMAIL PROTECTED] wrote: Hello: On a newly installed PostgreSQL server I made the mistake of restoring over the postgres database. Which I made me feel very silly and brought up a couple of

[GENERAL] two postgres server seeing the same data

2008-12-03 Thread Jaime Casanova
Hi, a client of mine is obsessed with the idea of having two postgres servers looking at the same partition of data... i think i can configure two servers pointing to the same $PGDATADIR and let one off and the other on but is it possible for load balancing, i mean with the two servers active?

Re: [GENERAL] two postgres server seeing the same data

2008-12-03 Thread Dave Page
On Wed, Dec 3, 2008 at 5:29 PM, Jaime Casanova [EMAIL PROTECTED] wrote: Hi, a client of mine is obsessed with the idea of having two postgres servers looking at the same partition of data... i think i can configure two servers pointing to the same $PGDATADIR and let one off and the other on

Re: [GENERAL] two postgres server seeing the same data

2008-12-03 Thread Joshua D. Drake
On Wed, 2008-12-03 at 12:29 -0500, Jaime Casanova wrote: Hi, a client of mine is obsessed with the idea of having two postgres servers looking at the same partition of data... i think i can configure two servers pointing to the same $PGDATADIR and let one off and the other on but is it

[GENERAL] Switch off PITR

2008-12-03 Thread Joey K.
Hello all, I have been doing PITR backups for a while to a backup server via NFS. It's working great. I have to shutdown the backup server for hardware/OS upgrade. I expect this upgrade will last a week. How do I turn off PITR in the mean time? I commented archive_command and issued a pg_ctl

Re: [GENERAL] Limit on number of databases in a Cluster ?

2008-12-03 Thread Josh Harrison
On Wed, Dec 3, 2008 at 11:51 AM, Scott Marlowe [EMAIL PROTECTED]wrote: On Wed, Dec 3, 2008 at 8:43 AM, Josh Harrison [EMAIL PROTECTED] wrote: Hi, 1. Is there a limit on the number of databases that can be in a single postgres cluster? No. I'm sure there's a practical limit into the

Re: [GENERAL] two postgres server seeing the same data

2008-12-03 Thread Andrew Sullivan
On Wed, Dec 03, 2008 at 09:43:24AM -0800, Joshua D. Drake wrote: You may have two servers pointed at $PGDATA but at no point can postgresql be running on both at the same time. More importantly, if you do this, you will probably be able to get the two postmasters to start up. This will

Re: [GENERAL] Switch off PITR

2008-12-03 Thread Bill Moran
In response to Joey K. [EMAIL PROTECTED]: How do I turn off PITR in the mean time? I commented archive_command and issued a pg_ctl reload and postgres is *still* archiving logs to the backup server. Pretty sure you're going to need a full restart -- reload won't cause that parameter to be

[GENERAL] Good Open source reverse UML creation tool

2008-12-03 Thread wild_oscar
I have been asked this question by some folks, and I have also asked the question myself several times: - Is there any good open source software that allows you to create a nice UML representation of an already existing database running on Linux This seems like a highly used feature for software

Re: [GENERAL] Switch off PITR

2008-12-03 Thread Joshua D. Drake
On Wed, 2008-12-03 at 13:16 -0500, Bill Moran wrote: In response to Joey K. [EMAIL PROTECTED]: How do I turn off PITR in the mean time? I commented archive_command and issued a pg_ctl reload and postgres is *still* archiving logs to the backup server. Pretty sure you're going to need

Re: [GENERAL] Good Open source reverse UML creation tool

2008-12-03 Thread Thomas Kellerer
wild_oscar wrote on 03.12.2008 19:22: I have been asked this question by some folks, and I have also asked the question myself several times: - Is there any good open source software that allows you to create a nice UML representation of an already existing database running on Linux Database

[GENERAL] about privileges on pg_stat_activity columns

2008-12-03 Thread Jaime Casanova
Hi, there is an auditor that want to monitor our database activity to see the session and the ip they come from, if they are waiting and so on... pg_stat_activity and pg_locks views come to my mind... we created an user to him and give him privileges to pg_locks and pg_stat_activity (and the

Re: [GENERAL] two postgres server seeing the same data

2008-12-03 Thread Jaime Casanova
On Wed, Dec 3, 2008 at 1:10 PM, Andrew Sullivan [EMAIL PROTECTED] wrote: On Wed, Dec 03, 2008 at 09:43:24AM -0800, Joshua D. Drake wrote: You may have two servers pointed at $PGDATA but at no point can postgresql be running on both at the same time. More importantly, if you do this, you will

Re: [GENERAL] two postgres server seeing the same data

2008-12-03 Thread Scott Marlowe
On Wed, Dec 3, 2008 at 2:23 PM, Jaime Casanova [EMAIL PROTECTED] wrote: On Wed, Dec 3, 2008 at 1:10 PM, Andrew Sullivan [EMAIL PROTECTED] wrote: On Wed, Dec 03, 2008 at 09:43:24AM -0800, Joshua D. Drake wrote: You may have two servers pointed at $PGDATA but at no point can postgresql be

Re: [GENERAL] two postgres server seeing the same data

2008-12-03 Thread Scott Marlowe
On Wed, Dec 3, 2008 at 2:29 PM, Scott Marlowe [EMAIL PROTECTED] wrote: On Wed, Dec 3, 2008 at 2:23 PM, Jaime Casanova [EMAIL PROTECTED] wrote: On Wed, Dec 3, 2008 at 1:10 PM, Andrew Sullivan [EMAIL PROTECTED] wrote: On Wed, Dec 03, 2008 at 09:43:24AM -0800, Joshua D. Drake wrote: You may have

Re: [GENERAL] two postgres server seeing the same data

2008-12-03 Thread Joshua D. Drake
On Wed, 2008-12-03 at 16:23 -0500, Jaime Casanova wrote: On Wed, Dec 3, 2008 at 1:10 PM, Andrew Sullivan [EMAIL PROTECTED] wrote: On Wed, Dec 03, 2008 at 09:43:24AM -0800, Joshua D. Drake wrote: You may have two servers pointed at $PGDATA but at no point can postgresql be running on both at

Re: [GENERAL] two postgres server seeing the same data

2008-12-03 Thread Jaime Casanova
On Wed, Dec 3, 2008 at 4:30 PM, Scott Marlowe [EMAIL PROTECTED] wrote: On Wed, Dec 3, 2008 at 2:29 PM, Scott Marlowe [EMAIL PROTECTED] wrote: On Wed, Dec 3, 2008 at 2:23 PM, Jaime Casanova [EMAIL PROTECTED] wrote: On Wed, Dec 3, 2008 at 1:10 PM, Andrew Sullivan [EMAIL PROTECTED] wrote: On

Re: [GENERAL] two postgres server seeing the same data

2008-12-03 Thread Scott Marlowe
On Wed, Dec 3, 2008 at 2:41 PM, Jaime Casanova [EMAIL PROTECTED] wrote: ok... actually i see no real value in that config (create a single point of contention) but everyone that has used (or at least read about) oracle think is the best thing to do... Having dealth with RAC, I can safely say

Re: [GENERAL] two postgres server seeing the same data

2008-12-03 Thread Andrew Sullivan
On Wed, Dec 03, 2008 at 04:23:15PM -0500, Jaime Casanova wrote: is this true even if one of the server just send SELECTs? Yep. A -- Andrew Sullivan [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Monty on MySQL 5.1: Oops, we did it again

2008-12-03 Thread Bruce Momjian
Jason Long wrote: Greg Smith wrote: I wonder if I'm the only one who just saved a copy of that post for reference in case it gets forcibly removed... Recently I was thinking about whether I had enough material to warrant a 2008 update to Why PostgreSQL instead of MySQL; who would have

[GENERAL] How to echo statements in sourced file?

2008-12-03 Thread Kynn Jones
Hi. I have a collection of SQL statements stored in a file that I run periodically via cron. Running this script takes a bit too long, even for a cron job, and I would like to profile it. I learned from Andreas Kretschmer (in another thread, in the pgsql-performance list) about the \timing

Re: [GENERAL] How to echo statements in sourced file?

2008-12-03 Thread Alvaro Herrera
Kynn Jones escribió: But now I need a way to have these statements that are being timed themselves echoed to the terminal. Is there a way to do this? psql -e -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom

[GENERAL] Reg: Nested query

2008-12-03 Thread Vignesh Raaj
Can anyone please help in getting a solution... I have two table, 1 contains all details of a person with person id as primary key. the other table has person id and parent id both referring to person table person id. My query is i have to get all the parents of a given person name. Please help me

[GENERAL] Linked server query problem

2008-12-03 Thread Anderson, Steven
I have SQL Server 2005 that is linked to Postgresql 8.3.1-1 The following query does not work SELECT id FROM ALERT.novastar.[public].[point] Error: OLE DB provider MSDASQL for linked server ALERT returned message ERROR: syntax error at or near Col1004; Error while executing the query.

Re: [GENERAL] How to echo statements in sourced file?

2008-12-03 Thread Harvey, Allan AC
right in my psql terminal after each statement in the file gets executed. But now I need a way to have these statements that are being timed themselves echoed to the terminal. Is there a way to do this? start psql with the -a switch, I think. Allan The material contained in this

Re: [GENERAL] Switch off PITR

2008-12-03 Thread Fujii Masao
On Thu, Dec 4, 2008 at 3:00 AM, Joey K. [EMAIL PROTECTED] wrote: Hello all, I have been doing PITR backups for a while to a backup server via NFS. It's working great. I have to shutdown the backup server for hardware/OS upgrade. I expect this upgrade will last a week. How do I turn off

Re: [GENERAL] Limit on number of databases in a Cluster ?

2008-12-03 Thread Scott Marlowe
On Wed, Dec 3, 2008 at 11:05 AM, Josh Harrison [EMAIL PROTECTED] wrote: On Wed, Dec 3, 2008 at 11:51 AM, Scott Marlowe [EMAIL PROTECTED] wrote: On Wed, Dec 3, 2008 at 8:43 AM, Josh Harrison [EMAIL PROTECTED] wrote: Hi, 1. Is there a limit on the number of databases that can be in a