Re: [GENERAL] Performance problem with low correlation data

2009-07-07 Thread Scara Maccai
But that would be a different query -- there's no restrictions on the t values in this one. There is a restriction on the t values: select * from idtable left outer join testinsert on id=ne_id where groupname='a group name' and time between $a_date and $another_date Have you tried

[GENERAL] Sugestion a db modele like mysql workbrench

2009-07-07 Thread Andreas Wenk
originally posted at BUGS list - now answering at GENERAL list Pavel Golub schrieb: Hello, Oscar. First of all you shouldn't post such messages here since this is not a bug for sure. Take a look on MicroOLAP Database Designer for PostgreSQL at

Re: [GENERAL] Normalize INTERVAL ouput format in a db driver

2009-07-07 Thread Albe Laurenz
Sebastien FLAESCH wrote: According to the doc, INTERVAL output format is controlled by SET intervalstyle. I am writing an interface/driver and need a solution to fetch/convert interval values independently from the current format settings... I could force my driver to implicitly set

Re: [GENERAL] Feistel cipher, shorter string and hex to int

2009-07-07 Thread Daniel Verite
Ivan Sergio Borgonovo wrote: I need shorter values (because they should be easier to type. To be sure to modify the function in a sensible way I really would appreciate some pointer. Still if it return What exactly is your desired range of output values? Best regards, -- Daniel

Re: [GENERAL] Out of memory error

2009-07-07 Thread Mark Cave-Ayland
Paul Smith wrote: It's actually ST_Intersects from PostGIS (some of the PostGIS function names are still recognize without the leading ST_). Not for too much longer - these have been deprecated for a while ;) http://postgis.refractions.net/documentation/manual-1.3/ch06.html#id2574404 #

Re: [GENERAL] Efficiently move data from one table to another, with FK constraints?

2009-07-07 Thread Albe Laurenz
Rob W wrote: I am using COPY to bulk load large volumes (i.e. multi GB range) of data to a staging table in a PostgreSQL 8.3. For performance, the staging table has no constraints, no primary key, etc. I want to move that data into the real tables, but need some advice on how to do that

Re: [GENERAL] An example needed for Serializable conflict...

2009-07-07 Thread Albe Laurenz
Durumdara wrote: Please send me an example (pseudo-code) for Serializable conflict. And I wanna know, if possible, that if more transactions only read the tables in Serializable mode, and one or others write to it, can I got some conflicts in read operation? You get a serialization conflict

Re: [GENERAL] Feistel cipher, shorter string and hex to int

2009-07-07 Thread Daniel Verite
Ivan Sergio Borgonovo wrote: r2:=l1 # 1366.0*r1+150889)%714025)/714025.0)*32767)::int; -- but what about this? where does it come from? This function: (1366.0*r1+150889)%714025 implements a known method to get random numbers. I think it comes from Numerical recipes by William

Re: [GENERAL] An example needed for Serializable conflict...

2009-07-07 Thread durumdara
Hi! Thanks for your help! Another question if I use only SELECTS can I get some Serialization Error? For example: I need a report tool that can show the actual state of the business. Because of I use value-dependent logic, I MUST use consistent state to preserve the equality of many values

Re: [GENERAL] An example needed for Serializable conflict...

2009-07-07 Thread Andres Freund
Hi durumdara, On Tuesday 07 July 2009 12:10:52 durumdara wrote: Another question if I use only SELECTS can I get some Serialization Error? No. For example: I need a report tool that can show the actual state of the business. Because of I use value-dependent logic, I MUST use consistent

Re: [GENERAL] Sugestion a db modele like mysql workbrench

2009-07-07 Thread Pavel Golub
Hello, Andreas. You wrote: AW originally posted at BUGS list - now answering at GENERAL list AW Pavel Golub schrieb: Hello, Oscar. First of all you shouldn't post such messages here since this is not a bug for sure. Take a look on MicroOLAP Database Designer for PostgreSQL at

Re: [GENERAL] combine multiple row values in to one row

2009-07-07 Thread Hartman, Matthew
Try this. select idn, array_to_string(array(select code from tbl t2 where t2.idn = t1.idn order by code), ', ') as codes fromtbl t1 group byidn order byidn Matthew Hartman Programmer/Analyst Information Management, ICP Kingston General Hospital

Re: [GENERAL] Feistel cipher, shorter string and hex to int

2009-07-07 Thread Ivan Sergio Borgonovo
On Tue, 07 Jul 2009 12:07:48 +0200 Daniel Verite dan...@manitou-mail.org wrote: Ivan Sergio Borgonovo wrote: r2:=l1 # 1366.0*r1+150889)%714025)/714025.0)*32767)::int; -- but what about this? where does it come from? This function: (1366.0*r1+150889)%714025 implements a

Re: [GENERAL] Normalize INTERVAL ouput format in a db driver

2009-07-07 Thread Sebastien FLAESCH
Albe Laurenz wrote: Sebastien FLAESCH wrote: According to the doc, INTERVAL output format is controlled by SET intervalstyle. I am writing an interface/driver and need a solution to fetch/convert interval values independently from the current format settings... I could force my driver to

Re: [GENERAL] Sugestion a db modele like mysql workbrench

2009-07-07 Thread Andreas Wenk
USTID: DE 238093396 Pavel Golub schrieb: Hello, Andreas. You wrote: AW originally posted at BUGS list - now answering at GENERAL list AW Pavel Golub schrieb: Hello, Oscar. First of all you shouldn't post such messages here since this is not a bug for sure. Take a look on MicroOLAP

Re: [GENERAL] Bug in ecpg lib ?

2009-07-07 Thread Albe Laurenz
l...@crysberg.dk wrote: I have now generate a rather small example where I experience the problem, attached. It is linked with the mudflapth library using the commands below. You may have to change the DBNAME and DBUSER. The delay just before the pthread_cancel(), i.e. sleep(10), is

[GENERAL] Table Partitioning : Having child tables in multiple database servers

2009-07-07 Thread Ransika de Silva
Hi all, We have got the Table Partitioning of PostgreSQL to work on one database server, where the Parent Table and Inherited Child Tables are on one (1) database server. The question which we need to get answered is, whether we can have the Child Tables in separate database servers? Can you

Re: [GENERAL] combine multiple row values in to one row

2009-07-07 Thread David Fetter
On Tue, Jul 07, 2009 at 01:59:35AM +0430, Lee Harr wrote: Hi; I'm looking for a way to do this: # \d tbl Table public.tbl Column | Type | Modifiers +-+--- idn| integer | code | text| # SELECT * FROM tbl; idn | code -+--

Re: [GENERAL] Table Partitioning : Having child tables in multiple database servers

2009-07-07 Thread Ransika de Silva
Hello, Many thanks for the quick response. Why I raised the previous question was to get an answer/solution for the following requirement; The client wants to have the freedom of increasing the processor power AND the storage by introducing new database servers. What is your thought on getting

Re: [GENERAL] combine multiple row values in to one row

2009-07-07 Thread David Fetter
On Tue, Jul 07, 2009 at 08:40:06AM -0700, David Fetter wrote: On Tue, Jul 07, 2009 at 01:59:35AM +0430, Lee Harr wrote: Is there a generic way to do this? An aggregate maybe? The aggregate is called array_agg() and it's in 8.4. You can then wrap array_to_string() around it and get

Re: [GENERAL] Table Partitioning : Having child tables in multiple database servers

2009-07-07 Thread Dimitri Fontaine
Hi, Ransika de Silva rans...@gmail.com writes: The client wants to have the freedom of increasing the processor power AND the storage by introducing new database servers. I think the following document will be of interest: http://wiki.postgresql.org/wiki/Image:Moskva_DB_Tools.v3.pdf It

Re: [GENERAL] Feistel cipher, shorter string and hex to int

2009-07-07 Thread Daniel Verite
Ivan Sergio Borgonovo wrote: I don't get the 1366.0 and the 714025.0. Writing 1366.0 isn't going to use float arithmetic? Yes, that's on purpose. Now that you mention it, I think that 1366.0 could be an integer instead, but the division by 714025 and multiplication by 32767 have to

[GENERAL] Trying to find a low-cost program for Data migration and ETL

2009-07-07 Thread Rstat
Hi, Im building a database for my company. We are a rather small size book company with a lot of references and still growing. We have a Mysql database here and are trying to find some good tools to use it at its best. Basically we are just starting up the database after dealing with Excel: we

Re: [GENERAL] Sugestion a db modele like mysql workbrench

2009-07-07 Thread Thomas Kellerer
Andreas Wenk wrote on 07.07.2009 09:33: originally posted at BUGS list - now answering at GENERAL list Pavel Golub schrieb: Hello, Oscar. First of all you shouldn't post such messages here since this is not a bug for sure. Take a look on MicroOLAP Database Designer for PostgreSQL at

Re: [GENERAL] Trying to find a low-cost program for Data migration and ETL

2009-07-07 Thread Richard Huxton
Rstat wrote: Hi, Im building a database for my company. We are a rather small size book company with a lot of references and still growing. We have a Mysql database here and are trying to find some good tools to use it at its best. You do realise this is a PostgreSQL mailing list? You'll

Re: [GENERAL] Passing a table to function

2009-07-07 Thread Richard Huxton
sqlguru wrote: In SQL 2008, we could pass tables into stored procedures. CREATE TABLE members -- Only username is required ( mem_username VARCHAR(25) NOT NULL PRIMARY KEY, mem_email VARCHAR(255), mem_fname VARCHAR(25), mem_lname VARCHAR(25) ); CREATE TABLE TYPE

Re: [GENERAL] howto determine rows count to be returned by DECLARE ... SELECT ...

2009-07-07 Thread Richard Huxton
Konstantin Izmailov wrote: Dear Community, I'm working on implementation of virtual grid using DECLARE... SELECT Advantage of virtual grid is that it loads only rows that a user is willing to see (with FETCH). However, it is not clear how to determine max rows count that the cursor can

Re: [GENERAL] Trying to find a low-cost program for Data migration and ETL

2009-07-07 Thread Scott Mead
On Tue, Jul 7, 2009 at 11:48 AM, Rstat tom.rus...@gmail.com wrote: Hi, Im building a database for my company. We are a rather small size book company with a lot of references and still growing. We have a Mysql database here and are trying to find some good tools to use it at its best.

Re: [GENERAL] Trying to find a low-cost program for Data migration and ETL

2009-07-07 Thread Scott Mead
On Tue, Jul 7, 2009 at 1:26 PM, Scott Mead scott.li...@enterprisedb.comwrote: You may have some luck by viewing a similar thread on another mailing list: http://www.theserverside.net/discussions/thread.tss?thread_id=54755 That being said, I would highly recommend using:

Re: [GENERAL] Passing a table to function

2009-07-07 Thread Merlin Moncure
On Mon, Jul 6, 2009 at 7:27 AM, sqlgurusqlg...@live.com wrote: In SQL 2008, we could pass tables into stored procedures. CREATE TABLE members -- Only username is required (     mem_username VARCHAR(25) NOT NULL PRIMARY KEY,     mem_email VARCHAR(255),     mem_fname VARCHAR(25),    

Re: [GENERAL] Sugestion a db modele like mysql workbrench

2009-07-07 Thread Andreas Wenk
Thomas Kellerer schrieb: Andreas Wenk wrote on 07.07.2009 09:33: originally posted at BUGS list - now answering at GENERAL list Pavel Golub schrieb: Hello, Oscar. First of all you shouldn't post such messages here since this is not a bug for sure. Take a look on MicroOLAP Database Designer

Re: [GENERAL] Problem search on text arrays, using the overlaps () operator

2009-07-07 Thread John Cheng
I don't mean to be pesky. I was just wondering if there is anything else I should try? Should I simply rewrite all queries, change the form WHERE textarr '{foo, bar}'::text[] To WHERE (textarr '{foo}'::text[] OR textarr '{bar}'::text[]) ? -- Sent via pgsql-general mailing

[GENERAL] End of updates info

2009-07-07 Thread Chris Velevitch
Where do I find information on which versions are no longer being updated or will soon cease being updated? Chris -- Chris Velevitch Manager - Adobe Platform Users Group, Sydney m: 0415 469 095 www.apugs.org.au Adobe Platform Users Group, Sydney July meeting: Going It Alone Date: Mon 20th July

[GENERAL] Compiling using Visual Studio 2005

2009-07-07 Thread Vikram Patil
Hello Folks, I am trying to compile PostgreSQL source code using Visual Studio 2005 . I am able to compile psql but while compiling .\contrib\uuid-ossp\uuid-ossp. I encountered following error. ecpg : warning PRJ0009: Build log could not be opened for writing.

[GENERAL] ZFS prefetch considered evil?

2009-07-07 Thread Yaroslav Tykhiy
Hi All, I have a mid-size database (~300G) used as an email store and running on a FreeBSD + ZFS combo. Its PG_DATA is on ZFS whilst xlog goes to a different FFS disk. ZFS prefetch was enabled by default and disk time on PG_DATA was near 100% all the time with transfer rates heavily

Re: [GENERAL] Compiling using Visual Studio 2005

2009-07-07 Thread Ms swati chande
Hi,   You may obtain the required files from: http://winpg.jp/~saito/pg_work/OSSP_win32/msvc/ for MS-VC++, by Hiroshi Saito   Copy uuid.h and uuid.lib from here to appropriate folders and it should work.   Swati Chande  

Re: [GENERAL] End of updates info

2009-07-07 Thread Bruce Momjian
Chris Velevitch wrote: Where do I find information on which versions are no longer being updated or will soon cease being updated? Uh, the stop being updated when they no longer appear on the main Postgres page: http://www.postgresql.org/ However, I we are now discussing ways of

[GENERAL] singletons per row in table AND locking response

2009-07-07 Thread Dennis Gearon
When locking is involved, does a transaction wait for access to a row or table, or does it just fail back to the calling code? Would it be up to my PHP code to keep hammeing for access to a row/table, or could a user defined function do that? I'd like to have a certain object in my PHP

Re: [GENERAL] singletons per row in table AND locking response

2009-07-07 Thread Dennis Gearon
I could have just as easily described it as a table of SERIALS, one per row, instead of per column. :0) Dennis Gearon Signature Warning EARTH has a Right To Life I agree with Bolivian President Evo Morales # The right to life: The right for no ecosystem to be eliminated by

Re: [GENERAL] [PERFORM] Postgres Clustering

2009-07-07 Thread Tim Uckun
2009/5/28 Eddy Ernesto Baños Fernández eeba...@estudiantes.uci.cu: Try Cybercluster I looked into that. There is one piece of documentation that is less than ten pages long. There is no users group, no listserve, no community that I can discern. Do you have experience with it and if so

Re: [GENERAL] Replication

2009-07-07 Thread Tim Uckun
Does anybody have any experience with tungsten or sequia they would like to share? How about pgcluster or cybercluster? There are a lot of options but not a lot of insight or documentation really. Also note that the postgres-r web site says it's not production ready and it will take months if

Re: [GENERAL] Postgres 8.3.7 Server Crash: failed to add item to the right sibling in index

2009-07-07 Thread CM J
Sounds like a data corruption problem After reindexing, the problem seems to go away. Is there any way to determine what caused the data corruption in the first place ?? Thanks. On Mon, Jul 6, 2009 at 8:29 PM, Tom Lane t...@sss.pgh.pa.us wrote: CM J postgres.new...@gmail.com writes:

Re: [GENERAL] Warm standby: 1 to N

2009-07-07 Thread Yar Tikhiy
On Tue, Jun 02, 2009 at 02:52:26PM -0400, Bruce Momjian wrote: Yaroslav Tykhiy wrote: Hi All, Let's consider the following case: WAL segments from a master have been shipped to N warm standby servers, and now the master fails. Using this or that mechanism, one of the warm standbys takes over