Re: [GENERAL] Override system-defined cast?

2006-10-13 Thread Peter
Is there any way I can override system-defined casts? Tried create cast (varchar as timestamptz) with function user_timestamptz(varchar) ; and got ERROR: cast from type pg_catalog.varchar to type timestamptz already exists DROP CAST does not work: ERROR: cannot drop cast from

Re: [GENERAL] looping through query to update column

2006-10-13 Thread Albe Laurenz
Jean-Christophe Roux wrote: I am trying to loop through a table to update one column create or replace function foo() returns integer as $$ declare rec RECORD; row integer := 0; begin for rec in select * from table loop update rec set recordid = row; row++;

Re: [GENERAL] UTF-8

2006-10-13 Thread Martijn van Oosterhout
On Thu, Oct 12, 2006 at 11:09:53PM +0200, Tomi NA wrote: 2006/10/12, Martijn van Oosterhout kleptog@svana.org: On Tue, Oct 10, 2006 at 11:49:06AM +0300, Martins Mihailovs wrote: There are some misunderstood. Im using Linux 2.6.16.4, postgresql 8.1.4, (there are one of locale: lv_LV.utf8,

Re: [GENERAL] Performance Problem

2006-10-13 Thread Martijn van Oosterhout
On Thu, Oct 12, 2006 at 10:26:28PM -0700, roopa perumalraja wrote: I am new to postgres and I have 4 doubts. 1) I have a performance problem as I am trying to insert around 60 million rows to a table which is partitioned. So first I copied the .csv file which contains data, with

Re: [GENERAL] postgresql.conf shared buffers

2006-10-13 Thread Harald Armin Massa
Jim, list,from your link:ttp://www.varlena.com/GeneralBits/Tidbits/annotated_conf_e.html I quote:As a rule of thumb, observe shared memory usage of PostgreSQL with tools like ipcs and determine the setting. Remember that this is only half the story. You also need to set

Re: [GENERAL] looping through query to update column

2006-10-13 Thread Rafal Pietrak
On Fri, 2006-10-13 at 09:23 +0200, Albe Laurenz wrote: You might use 'ctid' to identify the row if you have no suitable How should I use 'ctid'? Like in the case, when I've selected something by means of SELECT ... FOR UPDATE? -- -R ---(end of

Re: [GENERAL] Performance Problem

2006-10-13 Thread Uwe C. Schroeder
On Friday 13 October 2006 01:22, Martijn van Oosterhout wrote:   1) I have a performance problem as I am trying to insert around 60   million rows to a table which is partitioned. So first I copied the   .csv file which contains data, with COPY command to a temp table   which was quick. It

Re: [GENERAL] Performance Problem

2006-10-13 Thread A. Kretschmer
am Fri, dem 13.10.2006, um 1:55:06 -0700 mailte Uwe C. Schroeder folgendes: Does the table you're inserting into have indexes or foreign keys? Either of those slow down loading considerably. One commen workaround is to drop the indexes and constraints, load the data and re-add them. Why

[GENERAL] encoding problem

2006-10-13 Thread jef peeraer
i never thought i would be bblocked by an encoding problem :-( My database is in LATIN1 , i have entries like this in a table called gemeenten Column | Type | Modifiers ---+--+ id

[GENERAL] Execute a function upon a connection made/closed

2006-10-13 Thread Uyelik
Hi, Is there any way to execute a function upon a new connection made or existing one closed? Is active connections info stored on a table or (?) ? Regards, Mustafa

Re: [GENERAL] Execute a function upon a connection made/closed

2006-10-13 Thread A. Kretschmer
am Fri, dem 13.10.2006, um 12:25:38 +0300 mailte Uyelik folgendes: Hi, Is there any way to execute a function upon a new connection made or existing one closed? IIRC no, but you can set variables, perhaps this will help you. ALTER name SET parameter { TO | = } { value | DEFAULT } Is active

Re: [GENERAL] Execute a function upon a connection made/closed

2006-10-13 Thread Uyelik
A. Kretschmer wrote, On 13.10.2006 12:32: am Fri, dem 13.10.2006, um 12:25:38 +0300 mailte Uyelik folgendes: Hi, Is there any way to execute a function upon a new connection made or existing one closed? IIRC no, but you can set variables, perhaps this will help you.

[GENERAL] Partitioning vs. View of a UNION ALL

2006-10-13 Thread Ron Johnson
Hi, I've gotten preliminary approval to buy a server and load a *lot* of data into it. One table will eventually have 4.5Bn 330 bytes rows, the other 9Bn 300 byte rows. Other will only have a billion rows. They are easily partitioned by mm, which we call FISCAL_PERIOD. (In fact, the app

Re: [GENERAL] Execute a function upon a connection made/closed

2006-10-13 Thread A. Kretschmer
am Fri, dem 13.10.2006, um 12:47:09 +0300 mailte Uyelik folgendes: A. Kretschmer wrote, On 13.10.2006 12:32: am Fri, dem 13.10.2006, um 12:25:38 +0300 mailte Uyelik folgendes: Hi, Is there any way to execute a function upon a new connection made or existing

Re: [GENERAL] Partitioning vs. View of a UNION ALL

2006-10-13 Thread Harald Armin Massa
Ron,Even though using a view means that it would have to be recreatedeach period as the oldest table is dropped, please keep in mind: views are not really created ... also the command is named create viewVIEWS, at least in PostgreSQL (and Oracle) are nothing else then macros for Queries - the

Re: [GENERAL] looping through query to update column

2006-10-13 Thread Albe Laurenz
Rafal Pietrak wrote: You might use 'ctid' to identify the row if you have no suitable How should I use 'ctid'? Like in the case, when I've selected something by means of SELECT ... FOR UPDATE? You lock the table (with LOCK) or the row you're working on (with SELECT FOR UPDATE) so that

Re: [GENERAL] Performance Problem

2006-10-13 Thread Richard Broersma Jr
3) I want to use materialized views, I don?t understand it from http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html, can anyone explain me with a simple example. The following link helps to describe the idea behind each of the methods of Materialize views.

[GENERAL] Postgresql 6.13

2006-10-13 Thread Geoffrey
Hi, I'm from an alternative universe and I'm trying to install Postgresql 6.12. When will 6.13 be available? Sorry, couldn't resist... -- Until later, Geoffrey Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. - Benjamin

Re: [GENERAL] Postgresql 6.13

2006-10-13 Thread A. Kretschmer
am Fri, dem 13.10.2006, um 8:40:54 -0400 mailte Geoffrey folgendes: Hi, I'm from an alternative universe and I'm trying to install Postgresql 6.12. When will 6.13 be available? Huch? Sorry, couldn't resist... ;-) Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47215, D1:

Re: [GENERAL] Postgresql 6.13

2006-10-13 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm from an alternative universe and I'm trying to install Postgresql 6.12. When will 6.13 be available? It's in the /extras/postgres directory on the eighth installation DVD of Duke Nukem Forever. - -- Greg Sabino Mullane [EMAIL PROTECTED]

Re: [GENERAL] Partitioning vs. View of a UNION ALL

2006-10-13 Thread Merlin Moncure
On 10/13/06, Ron Johnson [EMAIL PROTECTED] wrote: Hi, I've gotten preliminary approval to buy a server and load a *lot* of data into it. One table will eventually have 4.5Bn 330 bytes rows, the other 9Bn 300 byte rows. Other will only have a billion rows. They are easily partitioned by

Re: [GENERAL] UTF-8

2006-10-13 Thread Tomi NA
2006/10/13, Martijn van Oosterhout kleptog@svana.org: On Thu, Oct 12, 2006 at 11:09:53PM +0200, Tomi NA wrote: 2006/10/12, Martijn van Oosterhout kleptog@svana.org: On Tue, Oct 10, 2006 at 11:49:06AM +0300, Martins Mihailovs wrote: There are some misunderstood. Im using Linux 2.6.16.4,

Re: [GENERAL] looping through query to update column

2006-10-13 Thread Jean-Christophe Roux
Thanks for the "ctid" trick. The code below worked fine for rec in select * from fromemail_trades loop update fromemail_trades set recordid = row where ctid = rec.ctid; row := row -1; end loop;The first line is a little different from your's: FOR row IN SELECT ctid, * FROM table FOR UPDATE

Re: [GENERAL] Postgresql 6.13

2006-10-13 Thread Richard Huxton
Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm from an alternative universe and I'm trying to install Postgresql 6.12. When will 6.13 be available? It's in the /extras/postgres directory on the eighth installation DVD of Duke Nukem Forever. Greg's mostly

Re: [GENERAL] looping through query to update column

2006-10-13 Thread Merlin Moncure
On 10/13/06, Jean-Christophe Roux [EMAIL PROTECTED] wrote: Thanks for the ctid trick. The code below worked fine for rec in select * from fromemail_trades loop update fromemail_trades set recordid = row where ctid = rec.ctid; row := row -1; end loop; The first line is a

Re: [GENERAL] looping through query to update column

2006-10-13 Thread Andrew - Supernews
On 2006-10-13, Albe Laurenz [EMAIL PROTECTED] wrote: You lock the table (with LOCK) or the row you're working on (with SELECT FOR UPDATE) so that nobody else can change it while you are working on it. You need something like ctid if your table has the fundamental flaw of lacking a primary

Re: [GENERAL] UTF-8

2006-10-13 Thread Martijn van Oosterhout
On Fri, Oct 13, 2006 at 03:40:17PM +0200, Tomi NA wrote: This is a reoccurring topic on the list: sure, it's possible to misconfigure pg so that uppercase/lowercase/ilike/tsearch2/order don't work with a single letter outside of the English alphabet, but the problem Martins seems to be facing

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-10 14:16:19 -0400: FUD from another open source project is really poor form, particulary when not in competing segements where a little bit of competitive rivalry is expected. OMG WTF what FUD??? # [EMAIL PROTECTED] / 2006-10-10 13:55:57 -0400:

Re: [GENERAL] exploiting features of pg to obtain polymorphism

2006-10-13 Thread Karsten Hilbert
On Thu, Oct 12, 2006 at 04:40:32PM +0200, Ivan Sergio Borgonovo wrote: Anyway it doesn't solve the problem of having lists that can contain different elements with same parent and maintain ref. integrity. Only to some degree. You can put a unique constraint and a serial default on the parent

Re: [GENERAL] A query planner that learns

2006-10-13 Thread Erik Jones
Forgive me if I'm way off here as I'm not all that familiar with the internals of postgres, but isn't this what the genetic query optimizer discussed the one of the manual's appendixes is supposed to do. Or, is that more about using the the known costs of atomic operations that make up a

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Alexander Staubo
On Oct 11, 2006, at 16:54 , [EMAIL PROTECTED] wrote: I'm author and maintainer of ZABBIX and the manual. I would like to add some comments to the thread. [snip] I just did the test on PostgreSQL 7.4.12 and MySQL 5.0.22 (MyISAM, sorry had no configured InnoDB). Ubuntu 6.0.6, AMD64, 2GB,

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Andrew - Supernews
On 2006-10-13, Alexander Staubo [EMAIL PROTECTED] wrote: On my box (Dell PowerEdge 1850, dual Xeon 2.8GHz, 4GB RAM, 10kRPM SCSI, Linux 2.6.15, Ubuntu) I get 1,100 updates/sec, compared to 10,000 updates/sec with MySQL/InnoDB, using a stock installation of both. Insert performance is only

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Alexander Staubo
On Oct 13, 2006, at 17:13 , Andrew - Supernews wrote: On 2006-10-13, Alexander Staubo [EMAIL PROTECTED] wrote: On my box (Dell PowerEdge 1850, dual Xeon 2.8GHz, 4GB RAM, 10kRPM SCSI, Linux 2.6.15, Ubuntu) I get 1,100 updates/sec, compared to 10,000 updates/sec with MySQL/InnoDB, using a stock

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Merlin Moncure
On 10/13/06, Roman Neuhauser [EMAIL PROTECTED] wrote: # [EMAIL PROTECTED] / 2006-10-10 14:16:19 -0400: FUD from another open source project is really poor form, particulary when not in competing segements where a little bit of competitive rivalry is expected. OMG WTF what FUD??? please

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Andrew - Supernews
On 2006-10-13, Alexander Staubo [EMAIL PROTECTED] wrote: On Oct 13, 2006, at 17:13 , Andrew - Supernews wrote: Your disk probably has write caching enabled. A 10krpm disk should be limiting you to under 170 transactions/sec with a single connection and fsync enabled. What formula did you use

Re: [GENERAL] UTF-8

2006-10-13 Thread Tomi NA
2006/10/13, Martijn van Oosterhout kleptog@svana.org: While sorting for multiple languages simultaneously is an issue, that's not the problem here. Linux/GLibc *does* support correct sorting for all language/charset combinations, and that's what he's using. Just for the hell of it I setup

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Alexander Staubo
On Oct 13, 2006, at 17:35 , Andrew - Supernews wrote: On 2006-10-13, Alexander Staubo [EMAIL PROTECTED] wrote: On Oct 13, 2006, at 17:13 , Andrew - Supernews wrote: Your disk probably has write caching enabled. A 10krpm disk should be limiting you to under 170 transactions/sec with a single

Re: [GENERAL] A query planner that learns

2006-10-13 Thread John D. Burger
Erik Jones wrote: Forgive me if I'm way off here as I'm not all that familiar with the internals of postgres, but isn't this what the genetic query optimizer discussed the one of the manual's appendixes is supposed to do. No - it's not an optimizer in that sense. When there are a small

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Andrew - Supernews
On 2006-10-13, Alexander Staubo [EMAIL PROTECTED] wrote: Makes sense. However, in this case I was batching updates in transactions and committing each txn at 1 second intervals, all on a single connection. In other words, the bottleneck illustrated by this test should not be related to

[GENERAL] Server Added Y'day. Missing Today

2006-10-13 Thread Harpreet Dhaliwal
Hi,Yesterday I configured a postgres server using Pgadmin3, restored the database from a backup.Today when i come and check my pgadmin, i can't see any server added there.Kind of confused.Can anyone please let me know whats happeneing here and what should i do to see the server that I added

Re: [GENERAL] A query planner that learns

2006-10-13 Thread AgentM
On Oct 13, 2006, at 11:47 , John D. Burger wrote: Erik Jones wrote: Forgive me if I'm way off here as I'm not all that familiar with the internals of postgres, but isn't this what the genetic query optimizer discussed the one of the manual's appendixes is supposed to do. No - it's not

Re: [GENERAL] UTF-8

2006-10-13 Thread Tom Lane
Tomi NA [EMAIL PROTECTED] writes: 2006/10/13, Martijn van Oosterhout kleptog@svana.org: Similarly, upper/lower are also supported, although postgresql doesn't take advantage of the system support in that case. I think this is the crux of the problem. If it were true, then it might be ...

Re: [GENERAL] exploiting features of pg to obtain polymorphism

2006-10-13 Thread Jeff Davis
On Fri, 2006-10-06 at 23:09 +0200, Ivan Sergio Borgonovo wrote: Is there any good documentation, example, tutorial, pamphlet, discussion... to exploit pg features to obtain polymorphic behavior without renouncing to referential integrity? Inheritance seems *just* promising. Any

[GENERAL] Query

2006-10-13 Thread Bob Pawley
I have a trigger that produces an error "returns more than one row". My intent is to fill one table (library.specification) from another (p_id.specification). The p_id table can have multiple instances of the same fluid but I want the library table to have only one record of each fluid.

Re: [GENERAL] PostgreSQL Database Transfer between machines(again)

2006-10-13 Thread Brian J. Erickson
The machine did boot and PostgreSQL started backup, etc. Thanks. - Original Message - From: Joshua D. Drake [EMAIL PROTECTED] To: Brian J. Erickson [EMAIL PROTECTED] Cc: PostgreSQL Mailing lists pgsql-general@postgresql.org Sent: Friday, October 06, 2006 9:17 AM Subject: Re: [GENERAL]

Re: [GENERAL] some log statements ignored

2006-10-13 Thread brian
Bruce Momjian wrote: brian wrote: I changed my postgresql.conf to have: log_statement = mod It appears to be working, though not logging *all* INSERTs. For instance, I have a PHP class that inserts into two tables in a transaction. The log shows the first, but not the second. Has anyone

Re: [GENERAL] UTF-8

2006-10-13 Thread Martijn van Oosterhout
On Fri, Oct 13, 2006 at 12:04:02PM -0400, Tom Lane wrote: Tomi NA [EMAIL PROTECTED] writes: 2006/10/13, Martijn van Oosterhout kleptog@svana.org: Similarly, upper/lower are also supported, although postgresql doesn't take advantage of the system support in that case. I think this is the

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Martijn van Oosterhout
On Fri, Oct 13, 2006 at 03:35:37PM -, Andrew - Supernews wrote: It's just the number of disk revolutions per second. Without caching, each WAL flush tends to require a whole revolution unless the on-disk layout of the filesystem is _very_ strange. You can get multiple commits per WAL flush

Re: [GENERAL] some log statements ignored

2006-10-13 Thread Tom Lane
brian [EMAIL PROTECTED] writes: Sorry--i hadn't had time to run a test. Setting it to 'all' works fine, and i think i see the problem: the second INSERT is in a prepared statement, so it's not being logged. PREPARE mdb2_statement_pgsql00fb05c2c509aa2608b68bf2b87693a2 AS INSERT INTO ...

Re: [GENERAL] UTF-8

2006-10-13 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: Characters havn't fitted in an unsigned char in a very long time. It's obviously bogus for any multibyte encoding (the code even says so). For such encodings you could use the system's towupper() (ANSI C/Unix98) which will work on any unicode

Re: [GENERAL] Server Added Y'day. Missing Today

2006-10-13 Thread Shane Ambler
Harpreet Dhaliwal wrote: Hi, Yesterday I configured a postgres server using Pgadmin3, restored the database from a backup. Today when i come and check my pgadmin, i can't see any server added there. Kind of confused. Can anyone please let me know whats happeneing here and what should i do to see

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: On Fri, Oct 13, 2006 at 03:35:37PM -, Andrew - Supernews wrote: It's just the number of disk revolutions per second. Without caching, each WAL flush tends to require a whole revolution unless the on-disk layout of the filesystem is _very_

Re: [GENERAL] A query planner that learns

2006-10-13 Thread Jim C. Nasby
On Thu, Oct 12, 2006 at 05:39:20PM -0500, Scott Marlowe wrote: It seems to me the first logical step would be having the ability to flip a switch and when the postmaster hits a slow query, it saves both the query that ran long, as well as the output of explain or explain analyze or

Re: [GENERAL] A query planner that learns

2006-10-13 Thread Jim C. Nasby
On Fri, Oct 13, 2006 at 11:53:15AM -0400, AgentM wrote: One simple first step would be to run an ANALYZE whenever a sequential scan is executed. Is there a reason not to do this? It Yes. You want a seqscan on a small (couple pages) table, and ANALYZE has a very high overhead on some

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Merlin Moncure
On 10/13/06, Tom Lane [EMAIL PROTECTED] wrote: Martijn van Oosterhout kleptog@svana.org writes: Is that really true? In theory block n+1 could be half a revolution after block n, allowing you to commit two transactions per revolution. Not relevant, unless the prior transaction happened to end

Re: [GENERAL] Partitioning vs. View of a UNION ALL

2006-10-13 Thread Jim C. Nasby
The only case I can think of where view partitioning makes more sense is if it's list partitioning where you can also drop a field from your tables. IE: if you have 10 projects, create 10 project_xx tables where xx is the ID of the project, UNION ALL them together in a view, and create rules on

Re: [GENERAL] Query

2006-10-13 Thread Jeff Davis
On Fri, 2006-10-13 at 09:42 -0700, Bob Pawley wrote: I have a trigger that produces an error returns more than one row. My intent is to fill one table (library.specification) from another (p_id.specification). The p_id table can have multiple instances of the same fluid but I want the

[GENERAL] Backup DB not getting connected

2006-10-13 Thread J S B
Hi,I took a back up of my database and restored it in a new DB..When I'm trying to connect to the new DB from a client machine using ECPG connection techniques, it says newDB doesn't exist.There's another DB in the same DB server and if I try and connect to that DB then it doesn't cry over

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Jeff Davis
On Fri, 2006-10-13 at 13:52 -0400, Merlin Moncure wrote: On 10/13/06, Tom Lane [EMAIL PROTECTED] wrote: Martijn van Oosterhout kleptog@svana.org writes: Is that really true? In theory block n+1 could be half a revolution after block n, allowing you to commit two transactions per

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Jim C. Nasby
On Fri, Oct 13, 2006 at 01:52:10PM -0400, Merlin Moncure wrote: On 10/13/06, Tom Lane [EMAIL PROTECTED] wrote: Martijn van Oosterhout kleptog@svana.org writes: Is that really true? In theory block n+1 could be half a revolution after block n, allowing you to commit two transactions per

Re: [GENERAL] some log statements ignored

2006-10-13 Thread brian
Tom Lane wrote: brian [EMAIL PROTECTED] writes: Sorry--i hadn't had time to run a test. Setting it to 'all' works fine, and i think i see the problem: the second INSERT is in a prepared statement, so it's not being logged. PREPARE mdb2_statement_pgsql00fb05c2c509aa2608b68bf2b87693a2 AS

Re: [GENERAL] some log statements ignored

2006-10-13 Thread Tom Lane
brian [EMAIL PROTECTED] writes: Tom Lane wrote: I'm betting that's really a Parse protocol message, not a PREPARE statement as such (the 8.1 logging code misguidedly tries to obscure the difference). The logging of the subsequent Bind/Execute messages is really weak in existing releases :-(.

Re: [GENERAL] Backup DB not getting connected

2006-10-13 Thread Shane Ambler
J S B wrote: Hi, I took a back up of my database and restored it in a new DB..When I'm trying to connect to the new DB from a client machine using ECPG connection techniques, it says newDB doesn't exist. There's another DB in the same DB server and if I try and connect to that DB then it

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Stephen Frost
* Alexander Staubo ([EMAIL PROTECTED]) wrote: What formula did you use to get to that number? Is there a generic way on Linux to turn off (controller-based?) write caching? Just a side-note, but if you've got a pretty good expectation that you won't be without power for 24 consecutive hours

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Joshua D. Drake
Stephen Frost wrote: * Alexander Staubo ([EMAIL PROTECTED]) wrote: What formula did you use to get to that number? Is there a generic way on Linux to turn off (controller-based?) write caching? Just a side-note, but if you've got a pretty good expectation that you won't be without power

Re: [GENERAL] A query planner that learns

2006-10-13 Thread Scott Marlowe
On Fri, 2006-10-13 at 12:48, Jim C. Nasby wrote: On Thu, Oct 12, 2006 at 05:39:20PM -0500, Scott Marlowe wrote: It seems to me the first logical step would be having the ability to flip a switch and when the postmaster hits a slow query, it saves both the query that ran long, as well

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Jeff Davis
On Fri, 2006-10-13 at 13:07 -0500, Jim C. Nasby wrote: On Fri, Oct 13, 2006 at 01:52:10PM -0400, Merlin Moncure wrote: On 10/13/06, Tom Lane [EMAIL PROTECTED] wrote: Martijn van Oosterhout kleptog@svana.org writes: Is that really true? In theory block n+1 could be half a revolution

Re: [GENERAL] Backup DB not getting connected

2006-10-13 Thread J S B
The user in the client machine is usrxyz (a unix user role) and user role that owns newDB is userxyz (a db user role)works fine with another database in the same database server with same user role combination. Don't know whats going wrong..On 10/13/06, Shane Ambler [EMAIL PROTECTED] wrote: J

Re: [GENERAL] Backup DB not getting connected

2006-10-13 Thread J S B
The only diff b/w the two DBs is that the one getting connected has ACL value as blank and the one that doesn't get connected has the same ACL property values = {}On 10/13/06, Shane Ambler [EMAIL PROTECTED] wrote: J S B wrote: Hi, I took a back up of my database and restored it in a new DB..When

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread AgentM
On Oct 13, 2006, at 14:36 , Joshua D. Drake wrote: Stephen Frost wrote: * Alexander Staubo ([EMAIL PROTECTED]) wrote: What formula did you use to get to that number? Is there a generic way on Linux to turn off (controller-based?) write caching? Just a side-note, but if you've got a pretty

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Merlin Moncure
On 10/13/06, AgentM [EMAIL PROTECTED] wrote: No to mention if you are *that* concerned you could buy a generator for 500 bucks that will keep the machine alive if you absolutely have to. There is nothing wrong with write back cache as long as you have the infrastructure to support it. Why

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Joshua D. Drake
2. less points of failure: ups doesnt help you if your cpu fries, power supply fries, memory frieds, motherboard fries, o/s halts, etc etc. :-) 3. experience has taught me not to put 100% faith in ups power switchover. As a follow up to this. We have all line conditioning natural gas

Re: [GENERAL] question on renaming a foreign key

2006-10-13 Thread Brent Wood
Jonathan Vanasco wrote: I made a HUGE mistake, and used 'UK' as the abbreviation for the united kingdom ( the ISO abbv is 'GB' ) I've got a database where 8 tables have an FKEY on a table 'location_country' , using the text 'uk' as the value -- so i've got 9 tables that I need to swap

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread alexei . vladishev
1. create table test (id int4, aaa int4, primary key (id)); 2. insert into test values (0,1); 3. Execute update test set aaa=1 where id=0; in an endless loop I just did the test on PostgreSQL 7.4.12 and MySQL 5.0.22 (MyISAM, sorry had no configured InnoDB). Ubuntu 6.0.6, AMD64, 2GB,

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread alexei . vladishev
I'm author and maintainer of ZABBIX and the manual. I would like to add some comments to the thread. just so you know, I brought this up after taking a look at the zabbix software, which is in my opinion very excellent. I came across a little strong in my comments and peter e was correct

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread alexei . vladishev
Unfortunately PostgreSQL performs much slower than MySQL doing large number of updates for one single table. By its nature ZABBIX requires to execute hundreds of updates per second for large installations. PostgreSQL cannot handle this nicely. If you refuse to vacuum (or have the table

Re: [GENERAL] List of supported 64bit OS

2006-10-13 Thread Stanislaw Tristan
Thanks for the answer! We'll order a 2 x Opteron2xxx series (Dual Core) and the memory will be 16-32 Gb. This server is only for DB - non other services such as hosting, mail and so on. I'm not system integrator, but the project manager and interesting about: - existing the free OS that ideally

[GENERAL] Searching a tool [like XAMPP on linux] of linux/apache/pgsql/php installer

2006-10-13 Thread jatrojoomla
Hi, I am searching a installer tool for linux / apache / pgsql / php [which is like WAMP or, XAMPP (on linux)]. is there any tool which is avaliable on net. ---(end of broadcast)--- TIP 4: Have you searched our list archives?

[GENERAL] problem with using O_DIRECT

2006-10-13 Thread Ye Qin
I tried to use O_DIRECT on Linux (SuSe) Kernel 2.6, but failed to make it run. For example, if I added the option in the open of BasicOpenFile(), I got the following error after typing psql -l, psql: could not connect to server: Connection refused Is the server running locally and

Re: [GENERAL] UTF-8

2006-10-13 Thread Martins Mihailovs
Martijn van Oosterhout wrote: On Thu, Oct 12, 2006 at 11:09:53PM +0200, Tomi NA wrote: 2006/10/12, Martijn van Oosterhout kleptog@svana.org: On Tue, Oct 10, 2006 at 11:49:06AM +0300, Martins Mihailovs wrote: There are some misunderstood. Im using Linux 2.6.16.4, postgresql 8.1.4, (there are

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Andrew Sullivan
On Fri, Oct 13, 2006 at 01:35:51PM -0400, Tom Lane wrote: looked reasonably robust --- ie, both safe and not full of unsupportable assumptions about knowing exactly where everything actually is on the disk platter. It'd still be interesting if anyone gets a new idea... Might it be the case

[GENERAL] Create Index on Date portion of timestamp

2006-10-13 Thread Niederland
I am using postgresql 8.1.4. Is there anyway to create an index equivalent to: CREATE INDEX i1 ON t1 USING btree (ts::Date); So that indexes are used for queries when the field is cast to a date. ---(end of broadcast)--- TIP 4: Have you searched

[GENERAL] SQL syntax error handling within SPI functions in C

2006-10-13 Thread Stuart Morse
Hi, Ive written a set of functions in C that will ultimately be called from an enterprise java bean. I expected that when calling SPI_exec(sql, 0) it would return an error code if sql contained a syntax error. At that point I would be able to return my own (more meaningful) error

[GENERAL]

2006-10-13 Thread SISTEMAS
El backend de Postgres (el programa ejecutable postgres real) lo puede ejecutar el superusuario directamente desde el intrprete de rdenes de usuario de Postgres (con el nombre de la base de datos como un argumento). Sin embargo, hacer esto elimina el buffer pool compartido y bloquea la

[GENERAL] Performance problem

2006-10-13 Thread roopa perumalraja
I am new to postgres and I have 4 doubts.1) I have a performance problem as I am trying to insert around 60 million rows to a table which is partitioned. So first I copied the .csv file which contains data, with COPY command to a temp table which was quick. It took only 15 to 20 minutes. Now I

Re: [GENERAL] Can a function determine whether a primary key constraint exists on a table?

2006-10-13 Thread Patrick TJ McPhee
In article [EMAIL PROTECTED], Albe Laurenz [EMAIL PROTECTED] wrote: % How can I check for the % presence of constraints inside a function? % % select t.oid as tableid, t.relname as tablename, % c.oid as constraintid, conname as constraintname % from

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread alexei . vladishev
it would be cool if you could at least: - bundle your updates into transactions of, say, 1000 updates at a time i.e. wrap a BEGIN; END; around a 1000 of them - run postgresql with fsync off, since you're using MyISAM - run PostgreSQL at least 8, since you're running MySQL 5 I'd bet

[GENERAL] PostgreSQL Shared Memory and Semaphors

2006-10-13 Thread [EMAIL PROTECTED]
Hello, I want to increase the max_connections of PostgreSQL from around 40 to around 100. For this I need to change the Shared Memory and Semaphores settings. I followed this link - http://www.postgresql.org/docs/8.1/interactive/kernel-resources.html#SYSVIPC and used the proposed values in

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Joshua D. Drake
Face it, if one does hundreds updates per second for one table (that's exactly what ZABBIX does, and not for one record(!) table as in my simple test), performance degrades so fast that vacuum has to be executed once per 5-15 seconds to keep good performance. The vacuum will run at least

Re: [GENERAL] Create Index on Date portion of timestamp

2006-10-13 Thread Andrew Sullivan
On Thu, Oct 12, 2006 at 06:40:22PM -0700, Niederland wrote: I am using postgresql 8.1.4. Is there anyway to create an index equivalent to: CREATE INDEX i1 ON t1 USING btree (ts::Date); So that indexes are used for queries when the field is cast to a date. I didn't try it, but you ought

Re: [GENERAL] SQL syntax error handling within SPI functions in C

2006-10-13 Thread Martijn van Oosterhout
On Thu, Oct 12, 2006 at 02:29:27PM -0700, Stuart Morse wrote: Hi, I've written a set of functions in C that will ultimately be called from an enterprise java bean. I expected that when calling SPI_exec(sql, 0) it would return an error code if sql contained a syntax error. At that point I

Re: [GENERAL]

2006-10-13 Thread Alvaro Herrera
SISTEMAS wrote: El backend de Postgres (el programa ejecutable postgres real) lo puede ejecutar el superusuario directamente desde el intérprete de órdenes de usuario de Postgres (con el nombre de la base de datos como un argumento). Sin embargo, hacer esto elimina el buffer pool compartido y

Re: [GENERAL] encoding problem

2006-10-13 Thread [EMAIL PROTECTED]
jef peeraer wrote: i never thought i would be bblocked by an encoding problem :-( My database is in LATIN1 , i have entries like this in a table called gemeenten Column | Type | Modifiers

Re: [GENERAL] Create Index on Date portion of timestamp

2006-10-13 Thread Tom Lane
Niederland [EMAIL PROTECTED] writes: I am using postgresql 8.1.4. Is there anyway to create an index equivalent to: CREATE INDEX i1 ON t1 USING btree (ts::Date); You're short some parentheses: CREATE INDEX i1 ON t1 USING btree ((ts::Date)); regards, tom lane

Re: [GENERAL] Create Index on Date portion of timestamp

2006-10-13 Thread A. Kretschmer
am Thu, dem 12.10.2006, um 18:40:22 -0700 mailte Niederland folgendes: I am using postgresql 8.1.4. Is there anyway to create an index equivalent to: CREATE INDEX i1 ON t1 USING btree (ts::Date); CREATE INDEX i1 ON t1 USING BTREE (to_char(ts, 'dd-mm-' )); *untested* Please, let me

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Thomas Kellerer
[EMAIL PROTECTED] wrote on 11.10.2006 16:54: Do a simple test to see my point: 1. create table test (id int4, aaa int4, primary key (id)); 2. insert into test values (0,1); 3. Execute update test set aaa=1 where id=0; in an endless loop As others have pointed out, committing the data is a

Re: [GENERAL] Backup DB not getting connected

2006-10-13 Thread Tom Lane
J S B [EMAIL PROTECTED] writes: The user in the client machine is usrxyz (a unix user role) and user role that owns newDB is userxyz (a db user role) I notice you keep spelling it as newDB ... is there a case-folding issue here perhaps? regards, tom lane

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Dann Corbit
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Thomas Kellerer Sent: Friday, October 13, 2006 2:11 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] more anti-postgresql FUD [EMAIL PROTECTED] wrote on 11.10.2006 16:54:

Re: [GENERAL] Backup DB not getting connected

2006-10-13 Thread J S B
well, newDB is the name of the database and that what I'm tryin to connect. I'm tryin to keep it the same case in ECPG code as it is in the Database. Do u mean to say that combination of upper and lower case is not allowed? in newDB , 'new' is all lower case and 'DB' is all upper. Thanks, Jas On

Re: [GENERAL]nbsp;encodingnbsp;problem

2006-10-13 Thread stevegy
Hi Jef,I use the prototype 1.4 to ajax some web pages. I have to encodeURI the post form data especial the string form value, otherwise the server will receive wrong encoding characters.If you can not see the query result in correct web page encoding, maybe the page container of this XUL ajax

  1   2   >