[GENERAL] disjunctive queries

2006-08-04 Thread andrew
Hi, What are the techniques used by PostgreSQL to optimize disjunctive queries? Treat every disjunct separately? Or special optimization is performed to save the cost? Could any one give me some general ideas? Thanks! -- andrew ---(end of

Re: [GENERAL] LISTEN considered dangerous

2006-08-04 Thread Flemming Frandsen
On Thu, 3 Aug 2006, Martijn van Oosterhout wrote: There is no reason to assume that there would be any overhead in storing a list of outstanding events for your connection compared to today. Err, yes there would. Think about it: for that example to work, the server would have to store

[GENERAL] Locale/encoding problem/question

2006-08-04 Thread henka
Hello all, I somehow managed to stuff up the encoding (or locale or something) in a transfer of a database from one machine to another (also different linux distribution). The problem is this: the origional database was created and populated with data using whatever default locale/encoding was

Re: [GENERAL] LISTEN considered dangerous

2006-08-04 Thread Martijn van Oosterhout
On Fri, Aug 04, 2006 at 10:24:43AM +0200, Flemming Frandsen wrote: On Thu, 3 Aug 2006, Martijn van Oosterhout wrote: Err, yes there would. Think about it: for that example to work, the server would have to store every notify that happened until your transaction completed. That's exactly

Re: [GENERAL] Locale/encoding problem/question

2006-08-04 Thread Martijn van Oosterhout
On Fri, Aug 04, 2006 at 10:48:17AM +0200, [EMAIL PROTECTED] wrote: Hello all, I somehow managed to stuff up the encoding (or locale or something) in a transfer of a database from one machine to another (also different linux distribution). The problem is this: the origional database was

Re: [GENERAL] LISTEN considered dangerous

2006-08-04 Thread Flemming Frandsen
On Fri, 4 Aug 2006, Martijn van Oosterhout wrote: Really? Even pg_dump cares? Or your maintainence scripts (VACUUM/ANALYZE)? Ok, those clients don't, but you rarely have many vacuum/pg_dump processes going on at the same time, so storing the events for them and throwing them away is not that

Re: [GENERAL] Locale/encoding problem/question

2006-08-04 Thread henka
On Fri, Aug 04, 2006 at 10:48:17AM +0200, [EMAIL PROTECTED] wrote: Hello all, I somehow managed to stuff up the encoding (or locale or something) in a transfer of a database from one machine to another (also different linux distribution). The problem is this: the origional database was

Re: [GENERAL] Locale/encoding problem/question

2006-08-04 Thread Martijn van Oosterhout
On Fri, Aug 04, 2006 at 11:58:22AM +0200, [EMAIL PROTECTED] wrote: On Fri, Aug 04, 2006 at 10:48:17AM +0200, [EMAIL PROTECTED] wrote: Two big questions: 1. What encoding are the two database (\l will tell you)? 2. What encoding are the clients expecting? I've even tried using LATIN1

Re: [GENERAL] Locale/encoding problem/question

2006-08-04 Thread henka
On Fri, Aug 04, 2006 at 11:58:22AM +0200, [EMAIL PROTECTED] wrote: On Fri, Aug 04, 2006 at 10:48:17AM +0200, [EMAIL PROTECTED] wrote: Two big questions: 1. What encoding are the two database (\l will tell you)? 2. What encoding are the clients expecting? I've even tried using LATIN1

Re: [GENERAL] Locale/encoding problem/question

2006-08-04 Thread Tom Lane
[EMAIL PROTECTED] writes: It should be in the dump file, almost the first line. Locale is of no interest to pg_dump, you'll have to decide how you want it. Yes: UTF-8 and the other is LATIN1 Note that this represents what the original server *thought* the encoding was. But it's not at all

[GENERAL] pg_dump sequence problem

2006-08-04 Thread Q Beukes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Is this a bug or a feature (PG 8.1.3)? If have a two schemas called: cbt and core. I have a sequence: core.invoicesids_seq. I have a couple of tables in cbt having columns with defaults: nextval('core.invoicesids_seq') When I dump the

Re: [GENERAL] Best Procedural Language?

2006-08-04 Thread Merlin Moncure
On 8/3/06, John Sidney-Woollett [EMAIL PROTECTED] wrote: I'd say that the biggest benefit of pl/pgsql for postgres is that it is so close to Oracle's own procedural language. This makes the job of porting from Oracle to postgres *nearly* trivial. while this is true, pl/pgsql has a lot of other

Re: [GENERAL] PITR Questions

2006-08-04 Thread Wayne Conrad
On Thu, Aug 03, 2006 at 05:03:35PM -0400, Matthew T. O'Connor wrote: I have it set as follows: archive_command = 'rsync -a %p backup_server:/pgsql_pitr/%f' Any comments as to whether or not this is a *good* choice? Are you also doing the dance with pg_start_backup(), doing a file copy of

Re: [GENERAL] pg_dump sequence problem

2006-08-04 Thread Nikolay Samokhvalov
On 8/4/06, Q Beukes [EMAIL PROTECTED] wrote: [...] When I dump the database, the tables dumped for cbt dont have alter commands to set the default values to nextval('core.invoicesids_seq') again. Those columns are simply created as serial fields, and their values set to 1, false. So when I

[GENERAL] PostgreSQL engagment

2006-08-04 Thread Steven Wai-Keung Cheng
Hi, I am the solution architect located in Hong Kong. Some of our partners are very interested to promote this product especially the Data Warehouse appliance. However, what kind of support or who I can contact to moving forward. -- Steven Cheng Solution Architect Greater China Client

Re: [GENERAL] PostgreSQL engagment

2006-08-04 Thread Chris Mair
I am the solution architect located in Hong Kong. Some of our partners are very interested to promote this product especially the Data Warehouse appliance. However, what kind of support or who I can contact to moving forward. Hello, you might want to check out the professional services

[GENERAL] Problem connecting to local host

2006-08-04 Thread Rohit Prakash Khare
I modified the .CONF file and set the Max_Connections from 100 to 2. But after that, postgresql stopped working and failed to start the service. It displayed an error 1603. I even removed the changes done and saved in an original way as it was before, but still nothing worked. I then

Re: [GENERAL] Well, Pervasive is now out....

2006-08-04 Thread Merlin Moncure
On 8/3/06, Joe Audette [EMAIL PROTECTED] wrote: My guess is what this really means is they weren't making money on it. Its a community friendly spin to suggest that community support is so good that not many companies will pony up for commercial support. My guess is that its fairly accurate

Re: [GENERAL] PostgreSQL engagment

2006-08-04 Thread Joshua D. Drake
Steven Wai-Keung Cheng wrote: Hi, I am the solution architect located in Hong Kong. Some of our partners are very interested to promote this product especially the Data Warehouse appliance. However, what kind of support or who I can contact to moving forward. http://www.greenplum.com

Re: [GENERAL] Create function problem

2006-08-04 Thread Michael Fuhr
[Please copy the mailing list on replies so others can contribute to and learn from the discussion.] On Fri, Aug 04, 2006 at 11:20:55AM +0300, gustavo halperin wrote: Michael Fuhr wrote: You've hardcoded the strings 'v_tbl_schm' and 'v_tbl_name' instead of using the function's arguments. I

Re: [GENERAL] Importance of re-index

2006-08-04 Thread Scott Marlowe
On Thu, 2006-08-03 at 18:03, Tom Lane wrote: Scott Marlowe [EMAIL PROTECTED] writes: Reindex was originally designed to fix broken indexes, and, at least in earlier encarnations, should something stop it in the middle of reindexing I believe it is possible to be left with no index.

Re: [GENERAL] PITR Questions

2006-08-04 Thread Matthew T. O'Connor
Wayne Conrad wrote: On Thu, Aug 03, 2006 at 05:03:35PM -0400, Matthew T. O'Connor wrote: I have it set as follows: archive_command = 'rsync -a %p backup_server:/pgsql_pitr/%f' Any comments as to whether or not this is a *good* choice? Are you also doing the dance with

Re: [GENERAL] pg_dump sequence problem

2006-08-04 Thread Tom Lane
Q Beukes [EMAIL PROTECTED] writes: Is this a bug or a feature (PG 8.1.3)? If have a two schemas called: cbt and core. I have a sequence: core.invoicesids_seq. I have a couple of tables in cbt having columns with defaults: nextval('core.invoicesids_seq') When I dump the database, the tables

Re: [GENERAL] Create function problem

2006-08-04 Thread gustavo halperin
Michael Fuhr wrote: [Please copy the mailing list on replies so others can contribute to and learn from the discussion.] On Fri, Aug 04, 2006 at 11:20:55AM +0300, gustavo halperin wrote: Michael Fuhr wrote: You've hardcoded the strings 'v_tbl_schm' and 'v_tbl_name' instead of using

Re: [NOVICE] [GENERAL] pg_dump sequence problem

2006-08-04 Thread Tom Lane
Nikolay Samokhvalov [EMAIL PROTECTED] writes: My suggestions are: - do not use SERIAL at all. Always create sequence manually and then write DEFAULT expr. Not an unreasonable suggestion. - when DEFAULT expr is simple nextval('...') you should make fool from pg_dump - write DEFAULT

[GENERAL] Recover lost database from DATA folder

2006-08-04 Thread Rohit Prakash Khare
I created few tables in one of my PostgreSQL database, but because of some connection problems I uninstalled it. have a DATA folder of my previous PostgreSQL installation. I want to use this directory on a new computer where I have presently installed PostgreSQL. I am using PostgreSQL 8.1

Re: [GENERAL] Create function problem

2006-08-04 Thread Michael Fuhr
On Fri, Aug 04, 2006 at 06:44:16PM +0300, gustavo halperin wrote: Michael Fuhr wrote: Since the function has OUT parameters you can use RETURNS SETOF record like this: CREATE FUNCTION funcname(params) RETURNS SETOF record AS $$ body $$ LANGUAGE SQL What do you mean with the word record,

Re: [GENERAL] Create function problem

2006-08-04 Thread gustavo halperin
Michael Fuhr wrote: On Fri, Aug 04, 2006 at 06:44:16PM +0300, gustavo halperin wrote: Michael Fuhr wrote: Since the function has OUT parameters you can use RETURNS SETOF record like this: CREATE FUNCTION funcname(params) RETURNS SETOF record AS $$ body $$ LANGUAGE SQL What do

Re: [GENERAL] pg_xlog not cleaned up

2006-08-04 Thread Christian Kastner
Tom Lane wrote: Wayne Conrad [EMAIL PROTECTED] writes: On Mon, Jul 31, 2006 at 10:18:31PM +0200, Christian Kastner wrote: After the online backup script runs, all subsequent attempts to run archive_command fail because the first thing it tries to archive away is the still-existing *.backup

[GENERAL] Scheduling Automatic Backups

2006-08-04 Thread RPK
I want to Schedule Automatic Backups of PostgreSQL, either using any Front-end or from within VB.NET 2003, so that there is no chance of highly critical data of my customer. How it can be done? -- View this message in context:

Re: [GENERAL] Scheduling Automatic Backups

2006-08-04 Thread Richard Huxton
RPK wrote: I want to Schedule Automatic Backups of PostgreSQL, either using any Front-end or from within VB.NET 2003, so that there is no chance of highly critical data of my customer. How it can be done? Use the built-in Windows scheduler and pg_dump. -- Richard Huxton Archonet Ltd

Re: [GENERAL] Recover lost database from DATA folder

2006-08-04 Thread Richard Huxton
Rohit Prakash Khare wrote: I created few tables in one of my PostgreSQL database, but because of some connection problems I uninstalled it. have a DATA folder of my previous PostgreSQL installation. I want to use this directory on a new computer where I have presently installed PostgreSQL. I

Re: [GENERAL] pg_xlog not cleaned up

2006-08-04 Thread Tom Lane
Christian Kastner [EMAIL PROTECTED] writes: That's not what I'm seeing. The following log messages are repeated every few minutes after a successful backup run: LOG: Archivbefehl /usr/local/bin/archive_wal.sh pg_xlog/000100020009.0018C208.backup

Re: [GENERAL] CREATE DATABASE

2006-08-04 Thread Rafal Pietrak
On Fri, 2006-08-04 at 00:44 +0400, Nikolay Samokhvalov wrote: But the logic is clear, isn't it? Connection is not client operation. I think that Rafal's proposal is quite interesting (I experience the same difficulties every time. There was several wrong DROP DATABASE in my career... :-) )

Re: [GENERAL] PITR Questions

2006-08-04 Thread Matthew T. O'Connor
Chander Ganesan wrote: Matthew T. O'Connor wrote: I have done some googling for real world archive_command examples and haven't really found anything. The example in the PGSQL Docs are qualified by (This is an example, not a recommendation, and may not work on all platforms.) I have it set

Re: [GENERAL] PITR Questions

2006-08-04 Thread Wayne Conrad
On Fri, Aug 04, 2006 at 11:04:03AM -0400, Matthew T. O'Connor wrote: Wayne Conrad wrote: Are you also doing the dance with pg_start_backup(), doing a file copy Yes, of course. Is there another way? Not that I know of. I'm embarassed I ask, since you know what you're doing. Wayne

Re: [GENERAL] Dumping database using 8.1 or 7.1

2006-08-04 Thread Jonathan Vallar
Hi!I was able to dump the corrupt database using Postgres 8.1. The pg_dump utility of 7.1 stops on errors. Are there issues in using pg_dump for Postgres 8.1 to a database created in Postgres 7.1?After dumping the database. I tried to load it on Postgres 8.1. I encountered errors on some database

Re: [GENERAL] Locale/encoding problem/question

2006-08-04 Thread henka
[EMAIL PROTECTED] writes: It should be in the dump file, almost the first line. Locale is of no interest to pg_dump, you'll have to decide how you want it. Yes: UTF-8 and the other is LATIN1 Note that this represents what the original server *thought* the encoding was. But it's not at

Re: [GENERAL] Dumping database using 8.1 or 7.1

2006-08-04 Thread Tom Lane
Jonathan Vallar [EMAIL PROTECTED] writes: After dumping the database. I tried to load it on Postgres 8.1. I encountered errors on some database tables. Some lines on the file are empty (a blank record or a corrupt record?). Before the said lines, there was a \M. What does \M stand for?

Re: [GENERAL] PITR Questions

2006-08-04 Thread Matthew T. O'Connor
Wayne Conrad wrote: On Fri, Aug 04, 2006 at 11:04:03AM -0400, Matthew T. O'Connor wrote: Wayne Conrad wrote: Are you also doing the dance with pg_start_backup(), doing a file copy Yes, of course. Is there another way? Not that I know of. I'm embarassed I ask, since you

Re: [GENERAL] SAVEPOINT and FOR UPDATE

2006-08-04 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Thomas F. O'Connell [EMAIL PROTECTED] writes: I sort of expected the release of the savepoint to be tantamount to a commit of the subtransaction, but it doesn't appear to have been. But you still haven't committed the outer transaction: rolling it back