Re: [GENERAL] Query m:n-Combination

2008-10-25 Thread Tomasz Myrta
Ludwig Kniprath napisal 24.10.2008 11:45: Join-table mn_2_r_id mn_2_c_id 1 1 1 2 1 3 1 4 2 1 3 2 3 5 4 3 ... (in real database this relation is an gis-relation with thousands of rivers and countries, related by

Re: [GENERAL] How with to emulate function TRANSFORM from Access in Postgress?

2008-10-25 Thread Tomasz Myrta
[EMAIL PROTECTED] napisal 24.10.2008 12:17: Hi, How with to emulate function TRANSFORM from Access in Postgress? Transform in Access: http://msdn.microsoft.com/en-us/library/bb208956.aspx You can find some useful cross tab functions here:

Re: [GENERAL] Order by with spaces and other characters

2008-10-25 Thread Tomasz Myrta
mike stanton napisal 24.10.2008 21:03: Hello everyone. We have a simple problem...that we have keys that include blanks and various other commonly used characters like ,, ; and -. For some reason, the select we have, nothing complicated, ignores these special characters and happily sorts by

[GENERAL] partitioning a table containing millions of records

2008-10-25 Thread Andreas Jochem
Hi, I have a question concerning the topic patitioning. I have a table with millions of records and I would like to partition it. I have already read the documentation but it could not answer my question. My question is, the following: Do I have to create the master and child tables and so

Re: [GENERAL] partitioning a table containing millions of records

2008-10-25 Thread Nikolas Everett
There is no fast way to split an existing table into partitions. Create a new parent table, create partitions, create the insert trigger, and then INSERT INTO newparent SELECT * FROM unpartitioned. You may want to split that into groups if you have many millions of rows. On Sat, Oct 25, 2008

Re: [GENERAL] Annoying Reply-To

2008-10-25 Thread Alvaro Herrera
Bruce Momjian wrote: I think this is the crux of the problem --- if I subscribed to multiple email lists, and some have rely going to the list and some have reply going to the author, I would have to think about the right reply option every time I send email. That's not really the case. I

Re: [GENERAL] Storing questionnaire data

2008-10-25 Thread Aaron
You may want to look at this article for some ideas: http://www.varlena.com/GeneralBits/110.php The article talks about doing dynamic schema design for online surveys... it's pretty interesting. Aaron Thul http://www.chasingnuts.com On Wed, Oct 22, 2008 at 10:59 AM, Thom Brown [EMAIL

Re: [GENERAL] statement_timeout by host?

2008-10-25 Thread Dave Fry
That's definitely an option, and that's what I had slated to use as my backup plan. But I wanted to make sure there wasn't the ability to do it by host before I went down that path, as it would be a somewhat cleaner fit in our setup. Thanks! Dave On Tue, Oct 21, 2008 at 1:57 PM, Jeff Davis

[GENERAL] again...

2008-10-25 Thread Ati Rosselet
I'm still getting a lot of these entries in my eventlog whenever I have a reasonably large amount of logging: Event Type:Error Event Source:PostgreSQL Event Category:None Event ID:0 Date:10/22/2008 Time:9:36:28 AM User:N/A Computer:--

[GENERAL] Question about VACUUM

2008-10-25 Thread Joey K.
Hello all, I inherited a 8.1.x database of size 200GB. This database hasn't been maintained much (autovac is enabled though). I been trying to VACUUM this db for the past few days for a couple of hours/day. The server runs 24x7 so continuous maintenance is not possible (this is the last

Re: [GENERAL] Question about VACUUM

2008-10-25 Thread Hannes Dorbath
Joey K. wrote: Is it possible to estimate how long VACUUM on a table might take? The table size is growing as VACUUM is being performed. I assume I need reindex after VACUUM is complete. I run VACUUM from psql and I Ctrl-C it to turn it off is this acceptable? maintenance_work_mem is

Re: [GENERAL] again...

2008-10-25 Thread Scott Marlowe
On Sat, Oct 25, 2008 at 9:12 AM, Ati Rosselet [EMAIL PROTECTED] wrote: I'm still getting a lot of these entries in my eventlog whenever I have a reasonably large amount of logging: Event Type:Error Event Source:PostgreSQL Event Category:None Event ID:0 Date:

Re: [GENERAL] again...

2008-10-25 Thread Ati Rosselet
I wish... no such luck. No virus scanner on the back end (nothing gets on the server except the database :)) It seems to be a race condition where the old file is closed before the new file is opened, and the logging attempt fails right at that time. The new file is created just fine, and from

Re: [GENERAL] Question about VACUUM

2008-10-25 Thread Scott Marlowe
On Sat, Oct 25, 2008 at 9:21 AM, Joey K. [EMAIL PROTECTED] wrote: Hello all, I inherited a 8.1.x database of size 200GB. This database hasn't been maintained much (autovac is enabled though). I been trying to VACUUM this db for the past few days for a couple of hours/day. The server runs

Re: [GENERAL] syncing with a MySQL DB

2008-10-25 Thread Ernesto QuiƱones
I use dbi-link, work fine, but I have problems when I call mysql tables linked and these tables are big, maybe a millon records, the answers is really slow, I need to wait 5 or more minutes to have an answer in a single query like this select * from table limit 10, I am thinking maybe dbi-link

Re: [GENERAL] support for embedded db and a clustered index?

2008-10-25 Thread Julian Bui
Hi all, Does pgsql provide support for a clustered index? By that I mean can I specify that the database insert records in the order of a particular attribute. Many of my queries are time-range based and my row inserts are done chronologically, so it would benefit to have them sorted by when

Re: [GENERAL] support for embedded db and a clustered index?

2008-10-25 Thread Scott Marlowe
On Sat, Oct 25, 2008 at 12:02 PM, Julian Bui [EMAIL PROTECTED] wrote: Hi all, Does pgsql provide support for a clustered index? By that I mean can I specify that the database insert records in the order of a particular attribute. Many of my queries are time-range based and my row inserts

Re: [GENERAL] JDBC - Call stored function that returns user defined type

2008-10-25 Thread cyw
While I still don't know who to handle returns with scalars and user defined types mixes, I tested with a function that returns only a SETOF a user defined type, the behavior is the same as a normal select return. You can use ReseultSet to traverse and get each column. CYW - Original

[GENERAL] a LEFT JOIN problem

2008-10-25 Thread Thomas
Hi, I have the following tables: Product(id, title, price) Item(id, product_id, order_id, quantity) Order(id, user_id, amount, paid) User(id, name) What I want to achieve is a query on a specific Product based in its title. If the product has at least 1 order in which it appears, then return

Re: [GENERAL] a LEFT JOIN problem

2008-10-25 Thread Tony Wasson
On Sat, Oct 25, 2008 at 2:11 PM, Thomas [EMAIL PROTECTED] wrote: Hi, I have the following tables: Product(id, title, price) Item(id, product_id, order_id, quantity) Order(id, user_id, amount, paid) User(id, name) What I want to achieve is a query on a specific Product based in its