Re: [GENERAL] database is bigger after dump/restore - why? (60 GB to 109 GB)

2011-02-27 Thread Alban Hertroys
a different block-size than the other? Is it set up as a raid array? If so, which raid-level? Are your dumps going to that same file-system, or to a different one? Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d6a2d1b11731601256477! -- Sent

Re: [GENERAL] finding strings with quotes

2011-02-26 Thread Alban Hertroys
TO 'off', in which case you'll just get a warning. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d68cc3d11735859949296! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Partitions and indexes

2011-02-26 Thread Alban Hertroys
you don't need as constraint exclusion already pointed the planner to the right table. In the parent table there wouldn't be any data to index. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d69400211732483184779

Re: [GENERAL] PostgresPlus Windows Installation Error

2011-02-17 Thread Alban Hertroys
127.0.0.1 localhost ::1 localhost. That should be the defaults. If anything, you probably just introduced another possible point of failure by doing this. You need to allow connections from localhost. Change your pg_hba.conf Alban Hertroys -- Screwing up is an excellent way to attach

Re: [GENERAL] Multithreaded query onto 4 postgresql instances

2011-02-16 Thread Alban Hertroys
there). Or you can split the database across multiple schema's, emulating the multi-database setup you have now. Or you can partition your tables (across multiple tablespaces would probably be a good idea). Plenty of options there. Alban Hertroys -- Screwing up is an excellent way to attach

Re: [GENERAL] pl/pgSQL variable substitution

2011-02-16 Thread Alban Hertroys
be in your queries as something else than a parameter reference. That said, I don't see where in your function you intend to use those parameters. Possibly you're trying to create a dynamic query? Pavel answered that part of your question already. Alban Hertroys -- Screwing up is an excellent

Re: [GENERAL] Multithreaded query onto 4 postgresql instances

2011-02-15 Thread Alban Hertroys
on. If you try to alter already complicated code for that purpose you'll probably just get more confused. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d5ac6b711731056715104! -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Speeding up index scans by truncating timestamp?

2011-02-15 Thread Alban Hertroys
and in the queries. I don't have time right now to verify that the storage space of a date is actually less than a timestamp, but I expect it would be (although, dates in PG have an awful lot of range!). Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see

Re: [GENERAL] Multithreaded query onto 4 postgresql instances

2011-02-14 Thread Alban Hertroys
querying the data silly difficult. But, we don't know the reason you're doing that of course. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. -- Alessandro Candini MEEO S.r.l. Via Saragat 9 I-44122 Ferrara

Re: [GENERAL] Multithreaded query onto 4 postgresql instances

2011-02-12 Thread Alban Hertroys
is probably not going to be a very good solution. As you've already found out, it makes querying the data silly difficult. But, we don't know the reason you're doing that of course. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest

Re: [GENERAL] Schema version control

2011-02-10 Thread Alban Hertroys
white-space, I'm sure some of those conflicts were quite unnecessary. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d54eac711731788013809! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] What's canceling autovacuum tasks?

2011-02-06 Thread Alban Hertroys
grow huge, but you should be able to see what statements coincide with autovacuum aborting. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d4f250611735773614733! -- Sent via pgsql-general mailing list (pgsql-general

[GENERAL] Tip: Transposing rows using generate_series()

2011-02-03 Thread Alban Hertroys
-+- 1 | 1 2 | Foo 3 | Bar 4 | 72 1 | 1 2 | fOo 3 | bAr 4 | 73 (8 rows) An extra column with the column-name is easily added using another CASE. Cheers, Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest

Re: [GENERAL] isn't insert into where not exists atomic?

2011-02-02 Thread Alban Hertroys
= NEW.chat_room_id; end if; return null; end if; return NEW; end; $$ language plpgsql; Your trigger is the wrong way around. Insert doesn't set found, but update does. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see

Re: [GENERAL] cast problem in Postgresql 9.0.1

2011-02-01 Thread Alban Hertroys
to accomplish by making it varchar? And no, of course you can't sum varchars, what kind of output would you expect from that? That an older version of Postgres didn't throw an error was probably a bug. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM

Re: [GENERAL] Book recommendation?

2011-02-01 Thread Alban Hertroys
of him every time you look into a mirror. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d487b6011733122416624! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Issues with generate_series using integer boundaries

2011-02-01 Thread Alban Hertroys
the end. That could actually be used as a feature to create a repeating series. A bit more control would be useful though :P Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d487c1211731974314558! -- Sent via pgsql

Re: [GENERAL] Adding more space, and a vacuum question.

2011-01-31 Thread Alban Hertroys
, unless made explicit. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d466a8511732033268635! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Select query ignores index on large table

2011-01-27 Thread Alban Hertroys
? BTW, 12M records isn't considered a large table by many Postgres users. It's certainly not small though, I suppose average fits the bill. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d41b62211732046819744

Re: [GENERAL] check on foreign table?

2011-01-26 Thread Alban Hertroys
integrity when inserting new values or updating existing ones. The drawback is a slightly larger footprint of your main table. In many cases natural keys are a performance gain though. Using enums would work very similar to this approach as well. Alban Hertroys -- Screwing up is an excellent way

Re: [GENERAL] Getting a sample data set.

2011-01-18 Thread Alban Hertroys
interesting if you don't have any columns that are distinct per mode. In such cases you can join your table(s) against generate_series() or use a windowing function with ranking. This has gotten much easier with our new CTE's (see the WITH keyword). Alban Hertroys -- Screwing up is an excellent way

Re: [GENERAL] Getting a sample data set.

2011-01-18 Thread Alban Hertroys
On 18 Jan 2011, at 19:59, James B. Byrne wrote: On Tue, January 18, 2011 13:23, Alban Hertroys wrote: Standard SQL alternatives tend to get complex, using self-joins to weed out all the records you don't want (the exact term for such joins escapes me right now, that would help

Re: [GENERAL] Getting a sample data set.

2011-01-18 Thread Alban Hertroys
for that. I'll probably be pestering some British friends with it in the coming days :) Talk about getting off-topic... I didn't get the impression anyone did mind though. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d362a8a11702229214598

Re: [GENERAL] Trigger Performance

2011-01-16 Thread Alban Hertroys
desperate coming up with new values to use after a while, especially if the contents need to make any sense. But of course much depends on the nature of the data in your field. You haven't said anything about that. Alban Hertroys -- If you can't see the forest for the trees, cut the trees

Re: [GENERAL] Record with a field consisting of table rows

2011-01-16 Thread Alban Hertroys
: type user_t = { uid: int; name: string; age: int; } type page_t = int * user_t list That's the refcursor option I gave you earlier. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d33222411702065417953! -- Sent via pgsql-general mailing

Re: [GENERAL] How to generate unique invoice numbers for each day

2011-01-16 Thread Alban Hertroys
almost impossible to not fail somewhere with complicated applications like this. Consider it a lesson learned. Just don't blame the database for it, especially not on a mailing-list about that database ;) Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see

Re: [GENERAL] Time Series on Postgres (HOWTO?)

2011-01-15 Thread Alban Hertroys
complicate matters more and probably hurt performance, so that's probably best left for if it's needed at all. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d318b0811872055413410! -- Sent via pgsql-general mailing list

Re: [GENERAL] Record with a field consisting of table rows

2011-01-15 Thread Alban Hertroys
the function (if it _is_ possible) will be tricky I think. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d31da3e11871342110173! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Record with a field consisting of table rows

2011-01-15 Thread Alban Hertroys
- 3| foo 3| bar 3| baz Or this: total | users - 3| [foo, bar, baz] Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM

Re: [GENERAL] Trigger Performance

2011-01-15 Thread Alban Hertroys
. But you already do have an index on that id-field, so what's the problem with using a unique constraint? Its unique index could just replace the existing one. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d323b1e11871071717716! -- Sent via

Re: [GENERAL] Record with a field consisting of table rows

2011-01-14 Thread Alban Hertroys
column. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d308e2711871421280230! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Record with a field consisting of table rows

2011-01-13 Thread Alban Hertroys
what you mean here, Postgres certainly _does_ support set-returning functions. Maybe you were referring to something in the particular context of the problem the OP is trying to solve? It would be kind of bad if people Google for this topic and would come back with the wrong conclusion. Alban

Re: [GENERAL] Record with a field consisting of table rows

2011-01-13 Thread Alban Hertroys
explicitly. Which makes me wonder, is table cloning supported for these cases? For example: create function get_page () returns setof table (LIKE users, total int) ... Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d2f50bf11877227918328

Re: [GENERAL] Record with a field consisting of table rows

2011-01-13 Thread Alban Hertroys
implementation of SRF's is not compatible with the ANSI SQL definition? Or something entirely different? Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d2f54ac11871133719602! -- Sent via pgsql-general mailing list

Re: [GENERAL] Mixed client_encoding database question

2011-01-11 Thread Alban Hertroys
client_encoding TO 'win1251'; Note: This is just off the top of my head, I haven't actually verified any of this. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d2c9b0a11871070112136! -- Sent via pgsql-general mailing

Re: [GENERAL] UUID column as pimrary key?

2011-01-06 Thread Alban Hertroys
goes for sequences. It would, for example, be (obviously) pretty insane to use UUID's for a 10-record lookup table. There's plenty of examples in this thread where they shine, I don't need to repeat that. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see

Re: [GENERAL] UUID column as pimrary key?

2011-01-06 Thread Alban Hertroys
hard to defend. In the end it often boils down to responsibility in case of failure, not to mention what it does to your own peace of mind. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d260af211541129314545

Re: [GENERAL] UUID column as pimrary key?

2011-01-06 Thread Alban Hertroys
On 6 Jan 2011, at 20:36, Chris Browne wrote: Infinite? The probability can't conceivably exceed 1. Don't start picking om words please, infinitely small or infinitesimal is obviously what I meant to write there. Alban Hertroys -- If you can't see the forest for the trees, cut the trees

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Alban Hertroys
as described, but are computers capable of generating those numbers sufficiently random that they actually achieve that low a chance? I think that's pushing it. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] Date Parameter To Query Confusing Optimizer

2011-01-03 Thread Alban Hertroys
versions (since 8.3?) are smarter about this particular scenario. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d22ca9a11548321074132! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Shit happens

2011-01-02 Thread Alban Hertroys
suppose you did already try restoring that dump and applying the log files to it and that failed? Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d20711d11541020214904! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] problem updating from form

2011-01-02 Thread Alban Hertroys
transaction somewhere? I'd imagine that in such cases access tries to perform an update, receives an error and changes the row contents back to what it was. You can look for open transactions and row locks in pg_stat_activity and pg_locks respectively. Alban Hertroys -- If you can't see the forest

Re: [GENERAL] query stuck at SOCK_wait_for_ready function call

2010-12-31 Thread Alban Hertroys
that function do? You appear to be running Postgres on a Windows machine? Are you sure you don't have some anti-virus package getting in the way locking files that are Postgres's? Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] Restore problem

2010-12-29 Thread Alban Hertroys
were referring to? I'm glad they fixed its 64kB file size limit though - about time! Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d1b2275802656600811020! -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Restore problem

2010-12-29 Thread Alban Hertroys
look at the function bodies as they are in the database, are their line-endings correct? It's possible that the error occurred as early as that. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d1b2392802653260212710

Re: [GENERAL] Restore problem

2010-12-29 Thread Alban Hertroys
or change data. It's an entirely different paradigm than what you're probably used to (I may assume wrongly here). Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d1b2723802651509919126! -- Sent via pgsql-general

Re: [GENERAL] Restore

2010-12-25 Thread Alban Hertroys
not on Windows, so recommending a better font is difficult, but I read Georgia and Verdana are good alternatives (I often find Verdana too wide though). Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] When the trigger is called my application is awaiting the finish

2010-12-24 Thread Alban Hertroys
that the function should be performed. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d1473b6802655198511903! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] How to guard PostgreSQL from overcharged and/or malicious (read-only) queries?

2010-12-21 Thread Alban Hertroys
on this list be pointed out as premature optimisation, although that usually involves query performance ;) Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d10881c802651631920626! -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] How to guard PostgreSQL from overcharged and/or malicious (read-only) queries?

2010-12-20 Thread Alban Hertroys
not be suitable for statistical analysis (random numbers and very unbalanced distributions are good examples). Therefore, if you plan to rely on the estimated time a query takes, you're going to be wrong sometimes. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see

Re: [GENERAL] libpq ASYNC with PQgetResult and PQisBusy

2010-12-20 Thread Alban Hertroys
the only exception I know of), there are plenty of online versions of man pages available. I'd suggest looking at the FreeBSD ones, as in my experience they tend to be pretty keen on proper documentation. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see

Re: [GENERAL] How to restore from backup to 8.4.3 server using 9.0 dump/restore

2010-12-16 Thread Alban Hertroys
-cooked software) there will be bugs in them. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d0a5a32802651802549062! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Is possible to use Prepare/Execute inside a function?

2010-12-15 Thread Alban Hertroys
) as select f_rodar_reportagem($1, $2); Again, post the error message please. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4d0912ac802659365313553! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Understanding Schema's

2010-12-14 Thread Alban Hertroys
[ ] ] CREATE SCHEMA AUTHORIZATION username [ schema_element [ ... ] ] Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4d086e81802651124320305! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Hanging with pg_restore and large objects

2010-12-07 Thread Alban Hertroys
of these two. Regardless, IMHO it shouldn't behave like it does for you now. It doesn't look like it's waiting on a lock elsewhere (Not with a CPU load like that), so it should either refuse or bail out, not enter some seemingly endless loop. Alban Hertroys -- If you can't see the forest

Re: [GENERAL] SELECT is immediate but the UPDATE takes forever

2010-12-07 Thread Alban Hertroys
? Or a foreign key constraint or an update trigger, to name a few other possibilities. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cfe7af5802659106873227! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] How to find correct locale name for CREATEDATABASE

2010-12-02 Thread Alban Hertroys
- neither of these situations can be solved by trying CREATE DATABASE with a different locale, not if the locale mattered in the first place. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cf7b25e802651003785035! -- Sent via pgsql-general

Re: [GENERAL] How to find correct locale name for CREATEDATABASE

2010-12-02 Thread Alban Hertroys
on different systems. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4cf7e5ea802651502012066! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] How to find correct locale name for CREATE DATABASE

2010-12-01 Thread Alban Hertroys
tools. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cf698ed802651815816680! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to find correct locale name for CREATE DATABASE

2010-12-01 Thread Alban Hertroys
usage though, I usually just stick with English. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cf6cd4e802658319426940! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Help on explain analyze

2010-11-27 Thread Alban Hertroys
rows=1 loops=10) Index Cond: ((cy.state = z.state) AND (cy.countyfips = z.countyfips)) Filter: (date_part('year'::text, now()) = date_part('year'::text, cy.dl_start)) Total runtime: 40073.738 ms (41 rows) Alban Hertroys -- If you can't see the forest for the trees, cut

Re: [GENERAL] [pgsql-www] Forums at postgresql.com.au

2010-11-21 Thread Alban Hertroys
is a different matter. Giving every forum poster their own e-mail address is a possible solution. I think that subscribing the forum with a few e-mail addresses is another, and that will also give you redundancy in case one of those addresses encounters a problem. Alban Hertroys -- If you can't

Re: [GENERAL] shared data for different applications

2010-11-21 Thread Alban Hertroys
, I don't know from experience how well Postgres would fare there, as it's not what we're using. I have no reason to suspect it to perform less well though. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4ce923f910421136214443! -- Sent via

Re: [GENERAL] [pgsql-www] Forums at postgresql.com.au

2010-11-21 Thread Alban Hertroys
%. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4ce93e6810421257911754! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] shared data for different applications

2010-11-21 Thread Alban Hertroys
haven't been in your position and I've never had an opportunity (or a reason) to put replication to practice. I've read a lot about it, mostly from this mailing list, but my knowledge in that respect is mostly theoretical. Alban Hertroys -- If you can't see the forest for the trees, cut

Re: [GENERAL] Survey on backing up unlogged tables: help us with PostgreSQL development!

2010-11-18 Thread Alban Hertroys
was not about layout, rather the DMLs. If I do an insert into an 'unlogged' table, what happens to that? Will that be replicated in the slave (using PostgreSQL's inbuilt replication)? What are the use-cases for replicating unlogged tables? Alban Hertroys -- If you can't see the forest

Re: [GENERAL] Survey on backing up unlogged tables: help us with PostgreSQL development!

2010-11-17 Thread Alban Hertroys
implications though, I wager... Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4ce4daf610425035851824! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Basic Tutorials for 9.0

2010-11-14 Thread Alban Hertroys
statement is probably what you're looking for). Seeing your original message though, I wonder whether you did create any tables at all before you tried copying data into them? -Original Message- From: Alban Hertroys [mailto:dal...@solfertje.student.utwente.nl] Sent: Saturday, November

Re: [GENERAL] Basic Tutorials for 9.0

2010-11-13 Thread Alban Hertroys
an ODBC connection to your database and look at it using Access or Openoffice's variant of that. There are plenty more possibilities. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cde80ae10261879520974! -- Sent via pgsql-general mailing list

Re: [GENERAL] PostgreSQL 8.2.3

2010-11-10 Thread Alban Hertroys
a good time to start with getting 8.4 or even 9.0 approved, so that you can upgrade in the not too distant future. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4cdae95810261036690396! -- Sent via pgsql-general mailing

Re: [GENERAL] Libpq is very slow on windows but fast on linux.

2010-11-09 Thread Alban Hertroys
cause. One of the problems Windows is facing is that, while supporting a lot of hardware is a good thing in general, it also supports all the crap hardware, crap drivers and crap ACPI implementations. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM

Re: [GENERAL] Syntax of: alter table ... add constraint ...

2010-11-08 Thread Alban Hertroys
the actual constraint expression. Hence the need to add 'check' (the constraint type) between 'pref_users_medals_check' (the name) and '(medals = 0)' (the expression). Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] I guess I'm missing something here WRT FOUND

2010-11-08 Thread Alban Hertroys
BITES! Well, 8 is better, but 7.4 was pretty ok. I think you're blaming your own error on the database here ;) Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cd8fdd810262051411171! -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] How to determine server version inside select statement

2010-10-31 Thread Alban Hertroys
- PostgreSQL 8.4.4 on i386-portbld-freebsd7.2, compiled by GCC cc (GCC) 4.2.1 200 70719 [FreeBSD], 32-bit (1 row) Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4ccdfa2010261036599539! -- Sent via

Re: [GENERAL] share lock when only one user connected?

2010-10-29 Thread Alban Hertroys
changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4cca678310291669837610! -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] How to update multiple rows

2010-10-26 Thread Alban Hertroys
to figure out where your brackets start and end ;) Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cc68b1c10291756917282! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Slow connection once the PC is network connected

2010-10-26 Thread Alban Hertroys
user = postgres password = password); Does it help any to add hostaddr = 127.0.0.1 to that string? Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cc6a70710292409920920! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] DB become enormous with continuos insert and update

2010-10-26 Thread Alban Hertroys
transactions, those could be locking the deleted rows' space and prevent vacuum from re-using that space for new rows. That's one reason that could explain your database growth. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest

Re: [GENERAL] Getting ROW_COUNT from MOVE in 8.3

2010-10-25 Thread Alban Hertroys
. You can use (movable) cursors in SQL though. That probably requires some client-side code, as things like GET DIAGNOSTICS aren't available in sql functions, but it may be of use to you. I've done this in a PHP web-application a couple of times. Alban Hertroys -- Screwing up is an excellent

Re: [GENERAL] Getting ROW_COUNT from MOVE in 8.3

2010-10-25 Thread Alban Hertroys
language I support. On Mon, Oct 25, 2010 at 1:29 PM, Alban Hertroys dal...@solfertje.student.utwente.nl wrote: On 24 Oct 2010, at 15:41, Reuven M. Lerner wrote: I've managed to improve things quite a bit by using cursors, but I've been stumped in trying to find a replacement for the COUNT

Re: [GENERAL] Custom cache implemented in a postgresql C function

2010-10-21 Thread Alban Hertroys
, as it isn't visible to other sessions, although you could create one per session of course. Of course, with a custom cache you have more control over how it behaves, so that may still be your best solution. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM

Re: [GENERAL] Generate a dynamic sequence within a query

2010-10-21 Thread Alban Hertroys
| BananaApple 4 | OrangeBananaApple 8 | LemonOrangeBananaApple Of course being able to use LAST requires that there's still a copy of the last returned row lingering in a buffer somewhere. If we have that, great! If we don't, well, it depends on how much the devs desire such a feature :) Alban

Re: [GENERAL] are there any method that Update command not affect other unrelated indices?

2010-10-13 Thread Alban Hertroys
the new version using the other indices. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cb55404678308231573016! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] are there any method that Update command not affect other unrelated indices?

2010-10-13 Thread Alban Hertroys
probably perform better. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4cb55736678302085914008! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] How to delete rows number 2,3,4...

2010-10-08 Thread Alban Hertroys
where there exists a value of A that is higher than the one in the current row, given B and C are equal. In SQL that is: DELETE FROM foo WHERE EXISTS ( SELECT 1 FROM foo WHERE foo.a a AND foo.b = bar.b AND foo.c = bar.c ) Alban Hertroys -- If you

Re: [GENERAL] PG website testing

2010-10-05 Thread Alban Hertroys
: Vertically-compressed.png Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cab6464678301219212522! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] Query tune, index is not using

2010-10-05 Thread Alban Hertroys
picklist_valueid | integer | not null default 0 Indexes: cf_1507_pkey PRIMARY KEY, btree (cf_1507id) Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4cab661b678301651414001! -- Sent via pgsql-general mailing list

Re: [GENERAL] PG website testing

2010-10-05 Thread Alban Hertroys
the description (maybe a slightly less white background colour?). Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4cab76da678305275619103! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Bit-wise foreign keys

2010-10-01 Thread Alban Hertroys
On 20 Sep 2010, at 19:25, Steve Atkins wrote: On Sep 20, 2010, at 10:06 AM, Alban Hertroys wrote: Hey all, I'm tossing an idea around again, namely using bit positions and values as foreign key references. Let's start with a bit of background information: I'm currently parsing a log-file

Re: [GENERAL] Basic question on PGSQL and Transactions

2010-09-29 Thread Alban Hertroys
On 29 Sep 2010, at 18:31, Henri De Feraudy wrote: I mean, if you are inserting into a table from PLPGSQL do you have to do an explicit commit at some stage? I suppose you meant psql here, as otherwise the above statement wouldn't make sense ;) Alban Hertroys -- Screwing up is an excellent

Re: [GENERAL] Killing stuck queries and preventing queries from getting stuck

2010-09-28 Thread Alban Hertroys
the query plans of some of your more problematic queries (see: explain analyse) to see what's going on there. Posting the results of those here would allow more eyes to look into your issues, in case it isn't obvious to you. There's some good documentation on these subjects too. Alban Hertroys

Re: [GENERAL] huge difference in performance between MS SQL and pg 8.3 on UPDATE with full text search

2010-09-28 Thread Alban Hertroys
it takes to load the csv a single update should run faster than a huge list of single statement update Correct. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4ca231ae678301692839670! -- Sent via pgsql-general

Re: [GENERAL] UPDATE/DELETE with ORDER BY and LIMIT

2010-09-25 Thread Alban Hertroys
, that way it's intended use is immediately clear from the table definition if people look it up. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4c9dcfe7678304776795795! -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Compiling openssl

2010-09-22 Thread Alban Hertroys
On 22 Sep 2010, at 22:00, Awodipe James wrote: Good day, Is it possible to use any of your products to compile openssl-1.0.0a.tar.gz No. Relational databases aren't generally used to compile code ;) I think you're looking to contact the guys of Mingw/Msys or possibly Cygwin. Alban Hertroys

Re: [GENERAL] Triggers and locking

2010-09-21 Thread Alban Hertroys
, or otherwise I can't understand why you'd want to update all citations every time one source record changes. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4c98edf010251425489017! -- Sent via pgsql-general mailing

[GENERAL] Bit-wise foreign keys

2010-09-20 Thread Alban Hertroys
matched - something like bit_accum() to turn the separate results into an array would be useful I think. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4c97949110251883445726! -- Sent via pgsql-general mailing list

Re: [GENERAL] how to insert multiple rows and get the ids back in a temp table (pgplsql)?

2010-09-19 Thread Alban Hertroys
; i 4 5 6 7 8 9 10 (7 rows) INSERT 0 7 Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4c96398f10255076983698! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] query join issue

2010-09-16 Thread Alban Hertroys
those conditions in your ON clause, like so: LEFT OUTER JOIN TRAIN_COMP ON ( TRAIN_MOD.TRM_TRC_SEQ=TRAIN_COMP.TRC_SEQ_NO AND (TC_PUB_ED IS TRUE OR TC_SEQ_NO IS NULL) ) Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM

Re: [GENERAL] SQL Programming Question

2010-09-11 Thread Alban Hertroys
an example from what I have in mind, after all ;) But of course for this particular situation it would be really ideal to be able to just do: MOVE * FROM staging_table TO live_table WHERE NOT EXISTS ( SELECT 1 FROM live_table WHERE key = staging_table.key ); Alban Hertroys -- If you can't

Re: [GENERAL] SQL Programming Question

2010-09-11 Thread Alban Hertroys
On 11 Sep 2010, at 12:09, Alban Hertroys wrote: It would be great to be able to use a WITH statement to lock down a data set for multiple subsequent operations, something like: WITH nonduplicates (key, data1, data2, etc) AS ( SELECT key, data1, data2, etc FROM staging_table

<    1   2   3   4   5   6   7   8   9   10   >