Re: [GENERAL] Index bloat of 4x

2007-01-22 Thread Csaba Nagy
On Fri, 2007-01-19 at 20:03, Jeremy Haile wrote: Is it feasible to add a reindex concurrently that doesn't lock the table for the rebuild, then locks the table when doing a second pass to pickup rows that were changed after the first pass? Or something like that IIRC, the objection was

Re: [GENERAL] uninstalling postgre sql on Fedora core 5

2007-01-22 Thread Tomasz Ostrowski
On Thu, 18 Jan 2007, [EMAIL PROTECTED] wrote: When I installed Fedora Core 5 Linux to my x86 Desktop machine, it automatically included PostGreSQL. What is the proper way to uninstall? Because you are probably a new user of Fedora, you should use graphical interface called pirut - if should

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server

2007-01-22 Thread Alban Hertroys
Paul Lambert wrote: G'day folks, I'm faily new to the world of Postgre so excuse me if these questions seem ignorant. My current employer develops a software package which runs on OpenVMS on HP Alpha/Itanium servers and contains a custom database comprised of various format text and

Re: [GENERAL] Replicating Binary Data from MS SQL 2000 to PG 8.2

2007-01-22 Thread Richard Huxton
Mike Poe wrote: The designer of the SQL 2000 database decided to store binary data (images) directly in this table. When I attempt to replicate it to my PG database, SQL replication agent throws an error: The process encountered invalid column data in bcp file 'path\to\bcpfile.bcp'. I

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Simon Riggs
On Sun, 2007-01-21 at 14:26 -0600, Jim C. Nasby wrote: On Sun, Jan 21, 2007 at 11:39:45AM +, Heikki Linnakangas wrote: Russell Smith wrote: Strange idea that I haven't researched, Given Vacuum can't be run in a transaction, it is possible at a certain point to quit the current

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Peter Rosenthal
Right, You also have to realize that your first query might return zero results, and MySQL (and maybe this is correct SQL behavior) balks at an empty value set where table_id in (). I would expect that giving the DBMS the whole picture of what you want to do, should allow it to make better

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Harald Armin Massa
select * from table where table_id in (?, ?, ?, ?, ?, ?, ?, ...) I usually try to rewrite this kind of queries to select whatever from table t1 join (select table_id from x where x) t2 using (table_id) And 3 out of 4 this performs better on Oracle and PostgreSQL. Would be curious

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Heikki Linnakangas
Russell Smith wrote: 2. Index cleanup is the most expensive part of vacuum. So doing a partial vacuum actually means more I/O as you have to do index cleanup more often. I don't think that's usually the case. Index(es) are typically only a fraction of the size of the table, and since 8.2 we

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server]]

2007-01-22 Thread Paul Lambert
Alban Hertroys wrote: Paul Lambert wrote: G'day folks, I'm faily new to the world of Postgre so excuse me if these questions seem ignorant. My current employer develops a software package which runs on OpenVMS on HP Alpha/Itanium servers and contains a custom database comprised of

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - January 21 2007 ==

2007-01-22 Thread Alvaro Herrera
David Fetter wrote: EnterpriseDB is now offering support packages for the main branch of PostgreSQL. http://www.enterprisedb.com/products/postgre_pricing.do Huh, it's interesting that they managed to get the Postgre stuff in the URL! -- Alvaro Herrera

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Chad Wagner
On 1/22/07, Harald Armin Massa [EMAIL PROTECTED] wrote: select * from table where table_id in (?, ?, ?, ?, ?, ?, ?, ...) I usually try to rewrite this kind of queries to select whatever from table t1 join (select table_id from x where x) t2 using (table_id) And 3 out of 4 this

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Harald Armin Massa
Chad, select * from table where table_id in (?, ?, ?, ?, ?, ?, ?, ...) I usually try to rewrite this kind of queries to select whatever from table t1 join (select table_id from x where x) t2 using (table_id) Because the results would be different than a subselect, less work

[GENERAL] Is there an equivalent of the W3c HTML checker for SQL?

2007-01-22 Thread David Goodenough
This may seem like a question unrelated to Postgresql, but I have recently noticed a project that is having a discussion about how their code should be developed. They are (unfortunately) developing first with MySQL, because that is what they are familiar with (I assume), but that inevitably

Re: [GENERAL] Using transactions with plpythonu

2007-01-22 Thread imageguy
Tom Lane wrote: imageguy [EMAIL PROTECTED] writes: So... unless I am missing something, I would suggest you CANNOT us plpython (or perhaps any other pl language ??) to process transactions I think the point you are missing is that every function already runs within a transaction. You

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 03:43, Alban Hertroys wrote: Paul Lambert wrote: G'day folks, I'm faily new to the world of Postgre so excuse me if these questions seem ignorant. My current employer develops a software package which runs on OpenVMS on HP

Re: [GENERAL] Using transactions with plpythonu

2007-01-22 Thread imageguy
Tom Lane wrote: imageguy [EMAIL PROTECTED] writes: In my testing so far, it seems that each call to plpy.execute('INSERT INTO ') is committed immediately. On what do you base that (erroneous) conclusion? The fact that a transaction can see its own updates does not mean they are

[GENERAL] Enable/Disable Triggers

2007-01-22 Thread Germán Hüttemann Arza
Hello, I tried to execute ALTER TABLE emp DISABLE TRIGGER after_ins_emp on PostgreSQL 7.4.13 and I realised that feature isn't include yet in this version. How can I enable/disable a trigger in this version of PostgreSQL? Should I set the attribute tgenabled from pg_trigger directly? Hope you

Re: [GENERAL] Migrate 8.0 dump to 7.4

2007-01-22 Thread Jan Muszynski
On 21 Jan 2007 at 15:11, Jim C. Nasby wrote: On Sun, Jan 21, 2007 at 12:27:41PM -0500, Jaime Casanova wrote: On 1/21/07, mbneto [EMAIL PROTECTED] wrote: Hi, I have a dumpall file generated from a 8.0 version that I need to import back to a 7.4 server. Is there a way to do that?

Re: [GENERAL] Is there an equivalent of the W3c HTML checker for

2007-01-22 Thread Markus Schiltknecht
Hi, I've just stumbled across the Mimer SQL Validator (commercial product): http://developer.mimer.com/validator/ Not that I know it... Anyway, there are different things (like PHP scripts or stored procedures and such), which do a whole lot of other logic and/or processing which influences

[GENERAL] security question

2007-01-22 Thread Sim Zacks
How good is postgresql security? For example, If I have data that I do not anyone to see, including the programmer/dba, is it enough to change the password to the only user? If they have access to the raw files is there a way for them to somehow see the data? can they copy the files to another

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server]]

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 07:09, Paul Lambert wrote: Alban Hertroys wrote: Paul Lambert wrote: [snip] I'd imagine there aren't too many VMS programmers around that would be willing to port Postgres either, but if anyone out there with experience in VMS

Re: [GENERAL] security question

2007-01-22 Thread A. Kretschmer
am Mon, dem 22.01.2007, um 16:10:15 +0200 mailte Sim Zacks folgendes: How good is postgresql security? For example, If I have data that I do not anyone to see, including the programmer/dba, is it enough to change the password to the only user? If they have access to the raw files is there a

Re: [GENERAL] security question

2007-01-22 Thread Martijn van Oosterhout
On Mon, Jan 22, 2007 at 04:10:15PM +0200, Sim Zacks wrote: How good is postgresql security? Good, within limits. For example, If I have data that I do not anyone to see, including the programmer/dba, is it enough to change the password to the only user? If they have access to the raw files

Re: [GENERAL] security question

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 08:22, Martijn van Oosterhout wrote: On Mon, Jan 22, 2007 at 04:10:15PM +0200, Sim Zacks wrote: How good is postgresql security? Good, within limits. For example, If I have data that I do not anyone to see, including the

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 05:49, Peter Rosenthal wrote: Right, You also have to realize that your first query might return zero results, and MySQL (and maybe this is correct SQL behavior) balks at an empty value set where table_id in (). I would expect

[GENERAL] CAST function for user defined type

2007-01-22 Thread Ron Peterson
I've created my own type: y_octet_16. Now I'm trying to create a CAST function for this type, but I'm not quite getting it. The input function for my type takes a 32 char hex string as input. CREATE TABLE bt ( name TEXT NOT NULL, val y_octet_16 NOT NULL ); CREATE INDEX

Re: [GENERAL] Loop in loop

2007-01-22 Thread Moritz Bayer
OK, this looks better: CREATE OR REPLACE FUNCTION getregistrationtagging() RETURNS SETOF ty_usertracking AS $BODY$ DECLARE objReturn ty_usertracking%rowtype; BEGIN for objReturn IN SELECT date_part('day',trackdate) as ty_day, date_part('month',trackdate) as

Re: [GENERAL] triggers and TriggerData

2007-01-22 Thread Michael Fuhr
On Sun, Jan 21, 2007 at 09:05:30PM -0800, Alan Hodgson wrote: On Sunday 21 January 2007 15:56, gustavo halperin [EMAIL PROTECTED] wrote: I have another question about triggers, how can I pass arguments ?? I read about some struct TriggerData *CurrentTriggerData, but I didn't found any

Re: [GENERAL] Loop in loop

2007-01-22 Thread A. Kretschmer
am Mon, dem 22.01.2007, um 15:58:32 +0100 mailte Moritz Bayer folgendes: But still the question: Is it possible to put a loop into a loop? Or doesn't it make sense at all? Yes, is possible, why not? And sometimes it make sense... Andreas -- Andreas Kretschmer Kontakt: Heynitz:

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Bruce Momjian
Heikki Linnakangas wrote: Russell Smith wrote: 2. Index cleanup is the most expensive part of vacuum. So doing a partial vacuum actually means more I/O as you have to do index cleanup more often. I don't think that's usually the case. Index(es) are typically only a fraction of the

Re: [GENERAL] security question

2007-01-22 Thread Martijn van Oosterhout
On Mon, Jan 22, 2007 at 08:30:53AM -0600, Ron Johnson wrote: The answer depends heavily on what the programmer/dba can do. Any superuser of the DB can see any data Any user that can access the raw files can see any data Any user that can poke into memory can see any data Any user that

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Martijn van Oosterhout
On Mon, Jan 22, 2007 at 09:44:52AM -0500, Ron Peterson wrote: I've created my own type: y_octet_16. Now I'm trying to create a CAST function for this type, but I'm not quite getting it. Quick question: do you mean: val y_octet_16 ^^ VALUES ( 'aaa', encode(

Re: [GENERAL] security question

2007-01-22 Thread Jan Muszynski
On 22 Jan 2007 at 16:10, Sim Zacks wrote: How good is postgresql security? For example, If I have data that I do not anyone to see, including the programmer/dba, is it enough to change the password to the only user? If they have access to the raw files is there a way for them to somehow

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Tom Lane
Ron Peterson [EMAIL PROTECTED] writes: I've created my own type: y_octet_16. Now I'm trying to create a CAST ^^ % INSERT INTO bt( name, val ) VALUES ( 'aaa', encode( y_uuid_generate(), 'hex' )::y_byte_16 ); ERROR: type y_byte_16 does not exist

[GENERAL] MSSQL/ASP migration

2007-01-22 Thread Robert Fitzpatrick
I have a customer who is wants to migrate his MSSQL database to PostgreSQL and we'll replace his application ASP with PHP. The issues should be limited as there are no stored procedures or triggers in MSSQL, just structure and data should be all that is needed to migrate. I have never migrated

Re: [GENERAL] security question

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 09:55, Jan Muszynski wrote: On 22 Jan 2007 at 16:10, Sim Zacks wrote: How good is postgresql security? For example, If I have data that I do not anyone to see, including the programmer/dba, is it enough to change the password to the

Re: [GENERAL] Is there an equivalent of the W3c HTML checker for SQL?

2007-01-22 Thread Tom Lane
David Goodenough [EMAIL PROTECTED] writes: This may seem like a question unrelated to Postgresql, but I have recently noticed a project that is having a discussion about how their code should be developed. They are (unfortunately) developing first with MySQL, because that is what they are

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Ron Peterson
On Mon, Jan 22, 2007 at 04:36:20PM +0100, Martijn van Oosterhout wrote: On Mon, Jan 22, 2007 at 09:44:52AM -0500, Ron Peterson wrote: I've created my own type: y_octet_16. Now I'm trying to create a CAST function for this type, but I'm not quite getting it. Quick question: do you mean:

Re: [GENERAL] Enable/Disable Triggers

2007-01-22 Thread Tom Lane
=?iso-8859-1?q?Germ=E1n_H=FCttemann_Arza?= [EMAIL PROTECTED] writes: Hello, I tried to execute ALTER TABLE emp DISABLE TRIGGER after_ins_emp on PostgreSQL 7.4.13 and I realised that feature isn't include yet in this version. How can I enable/disable a trigger in this version of PostgreSQL?

Re: [GENERAL] triggers and TriggerData

2007-01-22 Thread Alan Hodgson
On Monday 22 January 2007 07:04, Michael Fuhr [EMAIL PROTECTED] wrote: You can pass literal string arguments to a trigger function. See the CREATE TRIGGER documentation and, for PL/pgSQL, TG_ARGV and TG_NARGS. For C see Writing Trigger Functions in C; search for tgnargs and tgargs.

Re: [GENERAL] Password encryption method

2007-01-22 Thread Bruno Wolff III
On Sun, Jan 21, 2007 at 15:16:37 +0200, Andrus [EMAIL PROTECTED] wrote: No, the tables would be on the server, the same as was already being done. Using a separate table makes it more future proof. To access tables in server, you need to login into server. To login into server, you need

Re: [GENERAL] security question

2007-01-22 Thread Jan Muszynski
On 22 Jan 2007 at 10:15, Ron Johnson wrote: On 01/22/07 09:55, Jan Muszynski wrote: On 22 Jan 2007 at 16:10, Sim Zacks wrote: How good is postgresql security? For example, If I have data that I do not anyone to see, including the programmer/dba, is it enough to change the password to

Re: [GENERAL] Loop in loop

2007-01-22 Thread George Weaver
Original Message From: Moritz Bayer But still the question: Is it possible to put a loop into a loop? Or doesn't it make sense at all? I'm not sure what the OP was about, but Yes, it it possible to put a loop into a loop. See:

Re: [GENERAL] MSSQL/ASP migration

2007-01-22 Thread Peter Rosenthal
Wanting to do something similar I recently submitted a large patch to the mysql2pgsql project. It will now handle conversion of a mysqldump file complete with data for the quite large and diverse DB I was using it with. I'm sure there are still corner cases, but you should give it a try:

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Tom Lane
Ron Peterson [EMAIL PROTECTED] writes: That cleared one hurdle, but I'm still not there yet. % select 'fe43d07c0c624786bebfcb3357a2a13a'::y_octet_16; y_octet_16 -- fe43d07c0c624786bebfcb3357a2a13a That's not invoking any cast function, but the

[GENERAL] Tracking database activity

2007-01-22 Thread Erik Jones
Hi, I'm hoping someone can help me wrap my head around some #s I'm using to track database activity. I have a script that runs hourly and queries pg_stat_database and checks age(datfrozenxid) in pg_database. It logs those stats and the next hour, when it runs, it takes the differences to

[GENERAL] Loop in loop

2007-01-22 Thread Moritz Bayer
Hello group, I've got a new problem where I hope someone can give me a solution. I have witten a function which should give back a type created by me. To get the data into the type, I have to go through a loop, which holds other loops. Simplified (not really), it looks like this: CREATE OR

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Ron Peterson
On Mon, Jan 22, 2007 at 11:40:08AM -0500, Tom Lane wrote: Ron Peterson [EMAIL PROTECTED] writes: That cleared one hurdle, but I'm still not there yet. % select 'fe43d07c0c624786bebfcb3357a2a13a'::y_octet_16; y_octet_16 --

[GENERAL] selecting random rows

2007-01-22 Thread Kevin Murphy
Here is Josh Berkus' solution for randomly picking a single row from a query. I think the FAQ (www.postgresql.org/docs/faqs.FAQ.html#item4.1) could be updated with a link to this solution, which is more practical for large queries. www.powerpostgresql.com/Random_Aggregate Here is a

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Heikki Linnakangas
Bruce Momjian wrote: Heikki Linnakangas wrote: Russell Smith wrote: 2. Index cleanup is the most expensive part of vacuum. So doing a partial vacuum actually means more I/O as you have to do index cleanup more often. I don't think that's usually the case. Index(es) are typically only a

Re: [GENERAL] MSSQL/ASP migration

2007-01-22 Thread Robert Fitzpatrick
On Mon, 2007-01-22 at 16:32 +, Peter Rosenthal wrote: Wanting to do something similar I recently submitted a large patch to the mysql2pgsql project. It will now handle conversion of a mysqldump file complete with data for the quite large and diverse DB I was using it with. I'm sure there

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Bruce Momjian
Heikki Linnakangas wrote: Bruce Momjian wrote: Heikki Linnakangas wrote: Russell Smith wrote: 2. Index cleanup is the most expensive part of vacuum. So doing a partial vacuum actually means more I/O as you have to do index cleanup more often. I don't think that's usually the case.

Re: [GENERAL] MSSQL/ASP migration

2007-01-22 Thread Ted Byers
Is the original application ASP or SP.NET? It makes a difference, particularly if it was developed to take advantage of ASP.NET 2. It might conceivably be ASP.NET 3, but since that is brand new I can't see anyone paying to replace an ASP.NET 3 application that was just created. If it is

Re: [GENERAL] Loop in loop

2007-01-22 Thread Moritz Bayer
Hi Andreas, if it is possible, can you tell me what error I 've put in my first function? Thanks, Mo

Re: [GENERAL] MSSQL/ASP migration

2007-01-22 Thread Tony Caduto
Robert Fitzpatrick wrote: Any docs or other helpful info is welcome, just looking for some advise. One think I would recommend is to make sure when creating the new table structure that you make sure not to use capitalized object names. Because MS SQL server can be case insensitive I

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Simon Riggs
On Mon, 2007-01-22 at 12:18 -0500, Bruce Momjian wrote: Heikki Linnakangas wrote: In any case, for the statement Index cleanup is the most expensive part of vacuum to be true, you're indexes would have to take up 2x as much space as the heap, since the heap is scanned twice. I'm sure

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Gregory Stark
Bruce Momjian [EMAIL PROTECTED] writes: I agree it index cleanup isn't 50% of vacuum. I was trying to figure out how small, and it seems about 15% of the total table, which means if we have bitmap vacuum, we can conceivably reduce vacuum load by perhaps 80%, assuming 5% of the table is

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Bruce Momjian
Yep, agreed on the random I/O issue. The larger question is if you have a huge table, do you care to reclaim 3% of the table size, rather than just vacuum it when it gets to 10% dirty? I realize the vacuum is going to take a lot of time, but vacuuming to relaim 3% three times seems like it is

[GENERAL] printf-like format strings

2007-01-22 Thread Alexander Presber
Hello, does somebody know of an extension for postgres that allows the use of printf-like format strings? PL/Perl comes to mind, but how could one take care of the variable argument count? Thanks for any advice! Sincerely Alexander Presber ---(end of

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Gregory Stark
Bruce Momjian [EMAIL PROTECTED] writes: Yep, agreed on the random I/O issue. The larger question is if you have a huge table, do you care to reclaim 3% of the table size, rather than just vacuum it when it gets to 10% dirty? I realize the vacuum is going to take a lot of time, but

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Simon Riggs
On Mon, 2007-01-22 at 13:27 -0500, Bruce Momjian wrote: Yep, agreed on the random I/O issue. The larger question is if you have a huge table, do you care to reclaim 3% of the table size, rather than just vacuum it when it gets to 10% dirty? I realize the vacuum is going to take a lot of

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Scott Marlowe
On Sun, 2007-01-21 at 10:01, Shashank wrote: It seems MySQL just dropped the ball on the free version of their product, and it Not sure what you mean. I can download their latest versions without any trouble. Additionally, they feel that Oracle is such a threat that they have dumped

Re: [GENERAL] printf-like format strings

2007-01-22 Thread Terry Lee Tucker
On Monday 22 January 2007 12:59 pm, Alexander Presber [EMAIL PROTECTED] thus communicated: Hello, does somebody know of an extension for postgres that allows the use of printf-like format strings? PL/Perl comes to mind, but how could one take care of the variable argument count?

Re: [GENERAL] Password encryption method

2007-01-22 Thread Bertram Scharpf
Hi, Am Montag, 22. Jan 2007, 10:25:33 -0600 schrieb Bruno Wolff III: I didn't give an opinion on whether or not the whole approach was a good idea or not, since there wasn't enough detail in the original question. What I want to do is the following: 1. Login in from a program on a client as

Re: [GENERAL] printf-like format strings

2007-01-22 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message Alexander Presber asked: does somebody know of an extension for postgres that allows the use of printf-like format strings? PL/Perl comes to mind, but how could one take care of the variable

Re: [GENERAL] MSSQL/ASP migration

2007-01-22 Thread Robert Fitzpatrick
On Mon, 2007-01-22 at 12:13 -0500, Ted Byers wrote: Is the original application ASP or SP.NET? It makes a difference, particularly if it was developed to take advantage of ASP.NET 2. It might conceivably be ASP.NET 3, but since that is brand new I can't see anyone paying to replace an

Re: [GENERAL] printf-like format strings

2007-01-22 Thread Marc Evans
I have found the following technique works well for me: CREATE OR REPLACE FUNCTION audit_log_sprintf(text,integer) RETURNS TEXT as $$ my $fmt = shift; my $id = shift; my $msg = spi_exec_query(SELECT array_upper(msg_args,1) FROM audit_logs WHERE id = $id,1); my $nArgs =

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Jeff Davis
On Mon, 2007-01-22 at 10:30 +0800, Shashank Tripathi wrote: The problem is when the number of rows exceeds 30 million, MySQL performance degrades substantially. For most people, this is not an issue. PG is solid with huge databases, but in my experience, even the most optimized subselect on PG

[GENERAL] too many trigger records found for relation item - what's that about??

2007-01-22 Thread Lenorovitz, Joel
Greetings, I've had a strange error crop up recently on a table 'Item' which contains about 60 rows and lives in a development database I'm currently working on. Since the DB was last freshly created from a dump file several days ago I've added/dropped/altered a few tables (not necessarily

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server]]

2007-01-22 Thread Paul Lambert
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 07:09, Paul Lambert wrote: Alban Hertroys wrote: Paul Lambert wrote: [snip] I'd imagine there aren't too many VMS programmers around that would be willing to port Postgres either, but if anyone

Re: [GENERAL] postgresql scalability, active-active cluster

2007-01-22 Thread Jeff Davis
On Sun, 2007-01-21 at 06:55 -0800, brian stone wrote: Are there any built in tools or 3rd party tools for distributing a postgresql database? I need an active active configuration; master- master with fail over. The project I am working needs to support a very large number of transactions a

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - January 21 2007 ==

2007-01-22 Thread David Fetter
On Mon, Jan 22, 2007 at 10:17:05AM -0300, Alvaro Herrera wrote: David Fetter wrote: EnterpriseDB is now offering support packages for the main branch of PostgreSQL. http://www.enterprisedb.com/products/postgre_pricing.do Huh, it's interesting that they managed to get the Postgre stuff

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Alvaro Herrera
Bruce Momjian wrote: Yep, agreed on the random I/O issue. The larger question is if you have a huge table, do you care to reclaim 3% of the table size, rather than just vacuum it when it gets to 10% dirty? I realize the vacuum is going to take a lot of time, but vacuuming to relaim 3%

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Richard Huxton
Bruce Momjian wrote: Yep, agreed on the random I/O issue. The larger question is if you have a huge table, do you care to reclaim 3% of the table size, rather than just vacuum it when it gets to 10% dirty? I realize the vacuum is going to take a lot of time, but vacuuming to relaim 3% three

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Heikki Linnakangas
Gregory Stark wrote: Bruce Momjian [EMAIL PROTECTED] writes: I agree it index cleanup isn't 50% of vacuum. I was trying to figure out how small, and it seems about 15% of the total table, which means if we have bitmap vacuum, we can conceivably reduce vacuum load by perhaps 80%, assuming 5%

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Heikki Linnakangas
Kenneth Marshall wrote: On Mon, Jan 22, 2007 at 06:42:09PM +, Simon Riggs wrote: Hold that thought! Read Heikki's Piggyback VACUUM idea on new thread... There may be other functions that could leverage a similar sort of infrastructure. For example, a long DB mining query could be

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Bruce Momjian
Alvaro Herrera wrote: Bruce Momjian wrote: Yep, agreed on the random I/O issue. The larger question is if you have a huge table, do you care to reclaim 3% of the table size, rather than just vacuum it when it gets to 10% dirty? I realize the vacuum is going to take a lot of time, but

Re: [GENERAL] postgresql scalability, active-active cluster

2007-01-22 Thread brian stone
I never considered MySQL because I really DO need transactions. MySQL also lacks many enterprise features we need; well they say they have them but from my testing they are a bit under-cooked. I need atomic actions across an N number of application servers. The goal here is scalability,

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - January

2007-01-22 Thread Bruce Momjian
David Fetter wrote: On Mon, Jan 22, 2007 at 10:17:05AM -0300, Alvaro Herrera wrote: David Fetter wrote: EnterpriseDB is now offering support packages for the main branch of PostgreSQL. http://www.enterprisedb.com/products/postgre_pricing.do Huh, it's interesting that they

Re: [GENERAL] Index bloat of 4x

2007-01-22 Thread Ed L.
We have a large number (50+) of pre-8.2 clusters. How can I best/most easily identify those indices most bloated and in need of reindex/rebuilding? Ed ---(end of broadcast)--- TIP 4: Have you searched our list archives?

Re: [GENERAL] postgresql scalability, active-active cluster

2007-01-22 Thread Alvaro Herrera
brian stone wrote: I never considered MySQL because I really DO need transactions. MySQL also lacks many enterprise features we need; well they say they have them but from my testing they are a bit under-cooked. I need atomic actions across an N number of application servers. The goal

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server]]

2007-01-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/22/07 14:01, Paul Lambert wrote: Ron Johnson wrote: On 01/22/07 07:09, Paul Lambert wrote: Alban Hertroys wrote: Paul Lambert wrote: [snip] [snip] We've got pretty new hardware - DS15's, DS25's, Itaniums and so forth. But we

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - January

2007-01-22 Thread Dave Page
Bruce Momjian wrote: David Fetter wrote: On Mon, Jan 22, 2007 at 10:17:05AM -0300, Alvaro Herrera wrote: David Fetter wrote: EnterpriseDB is now offering support packages for the main branch of PostgreSQL. http://www.enterprisedb.com/products/postgre_pricing.do Huh, it's interesting that

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - January

2007-01-22 Thread Joshua D. Drake
Dave Page wrote: Bruce Momjian wrote: David Fetter wrote: On Mon, Jan 22, 2007 at 10:17:05AM -0300, Alvaro Herrera wrote: David Fetter wrote: EnterpriseDB is now offering support packages for the main branch of PostgreSQL. http://www.enterprisedb.com/products/postgre_pricing.do Huh, it's

Re: [GENERAL] postgresql scalability, active-active cluster

2007-01-22 Thread Jeff Davis
On Mon, 2007-01-22 at 17:37 -0300, Alvaro Herrera wrote: brian stone wrote: I never considered MySQL because I really DO need transactions. MySQL also lacks many enterprise features we need; well they say they have them but from my testing they are a bit under-cooked. I need atomic

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Joris Dobbelsteen
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gregory Stark Sent: maandag 22 januari 2007 19:41 To: Bruce Momjian Cc: Heikki Linnakangas; Russell Smith; Darcy Buskermolen; Simon Riggs; Alvaro Herrera; Matthew T. O'Connor; Pavan Deolasee; Christopher

Re: [GENERAL] Who is Slony Master/Slave + general questions.

2007-01-22 Thread Shoaib Mir
I dont have the replication setup on my machine right now but I guess as far as I remember you can surely check for the master and slave nodes from a Slony schema table. Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 19 Jan 2007 08:25:23 -0800, [EMAIL PROTECTED] [EMAIL

Re: [GENERAL] Password encryption method

2007-01-22 Thread Andrus
No, the tables would be on the server, the same as was already being done. Using a separate table makes it more future proof. To access tables in server, you need to login into server. To login into server, you need postresql user name and password sent by client and thus stored in client

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread Michael Nolan
John, you may not like it but we are in a competitive marketing environment with MySQL (even if both products are open source), and also with Oracle, SQL*Server, etc. The MySQL folks will take every chance they get to point out instances where PostgreSQL performance is inferior to MySQL (and

[GENERAL] Regular expressions and arrays and ANY() question

2007-01-22 Thread webb . sprague
I am trying to figure out how to use a regex and an ANY(), without any luck, to determine if at least one element of an array (on the right) matches the given constant pattern (on the left). I think the problem is because the pattern expects to be on the right side with the target on the left,

Re: [GENERAL] Help : Microsoft SQL Server equivalents in PostGreSQL

2007-01-22 Thread dean
Benedict Faria wrote: I need to use a postgreSQL equivalent for Updatetext and ReadText in MS SQL Server. Any pointers on what the PostgreSQL equivalent is? Hi Benedict, I don't see an exact equivalent to MS SQL Server's UpdateText (and ReadText) commands in pgsql or any other PostgreSQL

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-22 Thread brian stone
I think any comparison between mysql and postgresql is faulty. I have used mysql for a very long time. As my skills matured and I was entrusted with larger projects, I could no longer make an intelligent case to use mysql over postgresql. I needed more from my database. Most arguments in

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server

2007-01-22 Thread Paul Lambert
Nicolas Barbier wrote: 2007/1/19, Paul Lambert [EMAIL PROTECTED]: A number of months ago I was pointed towards Postgre as a reliable database server Please don't use the word Postgre: url:http://stoned.homeunix.org/~itsme/postgre/. greetings, Nicolas My apologies, being relatively new to

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server]

2007-01-22 Thread Engada
Alban Hertroys wrote: Paul Lambert wrote: G'day folks, I'm faily new to the world of Postgre so excuse me if these questions seem ignorant. My current employer develops a software package which runs on OpenVMS on HP Alpha/Itanium servers and contains a custom database comprised of

[GENERAL] show all record between two date after group by and aggrigation...

2007-01-22 Thread deepak pal
i am fatching record's from data base between two date range for registration_date coloum and than group by an count it using count(registration_date) i have to show all dates even if date is not there in registration_date ,it should show date and 0 in count.,how can i do it plz healp...

[GENERAL]

2007-01-22 Thread Laurent Manchon
Hi, I have a slow response of my PostgreSQL database 7.4 using this query below on a table with 80 rows: select count(*)from tbl; PostgreSQL return result in 28 sec every time. although MS-SQL return result in 0.02 sec every time. My server is a DELL PowerEdge 2600 with bi-processor Xeon

[GENERAL] Trouble creating database with proper encoding

2007-01-22 Thread Rob Tanner
Hi, This is my first venture into PostgreSQL. I built and installer PostgreSQL 8.2.1 as part of a Xythos installation. I added a user called xythos and now I'm trying to add the initial databases that the product requires. From the command line, I executed the commands: createdb -U xythos -E

Re: [GENERAL] Trouble creating database with proper encoding

2007-01-22 Thread Brandon Aiken
Strictly speaking, Unicode is a whole family of code pages. Unicode generally means multi-byte character encoding. UTF-8 is the most common encoding implementation of Unicode at the moment. UTF-16 is also popular, but very few systems need that many characters or wish to devote that many bytes

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL

2007-01-22 Thread Bruce Momjian
Engada wrote: I'm faily new to the world of Postgre so excuse me if these questions seem ignorant. My current employer develops a software package which runs on OpenVMS on HP Alpha/Itanium servers and contains a custom database comprised of various format text and binary files. I.e.

Re: [GENERAL] Trouble creating database with proper encoding

2007-01-22 Thread Tommy Gildseth
Rob Tanner wrote: createdb -U xythos -E UNICODE XythosDocumentStoreDB createdb -U xythos -E UNICODE XythosGlobalDB When I look at what I've done with psql -l, I get List of databases Name | Owner | Encoding ---+--+--

  1   2   >