Re: [GENERAL]

2007-10-30 Thread Martijn van Oosterhout
ter text search? I have come across the bad performance > of LIKE statement. See tsearch2. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] INDEX and JOINs

2007-10-26 Thread Martijn van Oosterhout
d: (t_dati.camp_id = t_campi.camp_id) > > prove=# \d t_dati Ok, my suggestion would be to run it with "enable_seqscan=off" and if that is indeed faster, then try reducing random_page_cost. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/

Re: [GENERAL] INDEX and JOINs

2007-10-26 Thread Martijn van Oosterhout
rding to the schema you sent so that's the problem. Or you broke something while "translating". > (I translated the table and column names. The substance is the same.) Try not translating, and we might get somewhere... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED

Re: [GENERAL] INDEX and JOINs

2007-10-26 Thread Martijn van Oosterhout
sequential > scan on T_DATA. And this explains the timing. > Is there a way to avoid such a behaviour by acting on indexes? Firstly, have you run ANALYZE recently. Secondly, you'll have to show us the output of EXPLAIN ANALYZE if you want some useful help. Have a nice day, -- Ma

Re: [GENERAL] Selecting K random rows - efficiently!

2007-10-24 Thread Martijn van Oosterhout
s very much bigger than that, in which I suppose the not-entirely-random is unlikely to play much of a role. Search the archives, there have been solutions proposed before, though they probably arn't very quick... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> htt

Re: [GENERAL] pg_cancel_backend() does not work with buzz queries

2007-10-23 Thread Martijn van Oosterhout
client. It would also be interesting to know what the original client is doing, since it's obviously still alive. Looks like somewhere along the chain a program called shutdown() but is no longer reading incoming data... Hope this helps, -- Martijn van Oosterhout <[EMAIL PROTECTED]> h

Re: [GENERAL] keeping an index in memory

2007-10-21 Thread Martijn van Oosterhout
be in the system cache anyway. I wonder if there's something else we havn't been told, like how big the actual table is and whether there are any other large tables/indexes. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From eac

Re: [GENERAL] Resetting SEQUENCEs

2007-10-18 Thread Martijn van Oosterhout
day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Will UPDATE lock if FROM refers to target table?

2007-10-17 Thread Martijn van Oosterhout
On Mon, Oct 15, 2007 at 03:23:59PM -0400, Carlo Stonebanks wrote: > Would someone be kind enough to tell me if there is somethign wrong with > this apporach: Can't see anything obviously wrong, but if you want more help you'll need to provide the EXPLAIN output. Have a nice day,

Re: [GENERAL] CHAR SETS

2007-10-13 Thread Martijn van Oosterhout
CII, umlauts/etc simply won't be recognised. UTF8 means the DB will check your data is properly represented and make an effort to handle case-sensetivity and such things for you. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each ac

Re: [GENERAL] Missing files under pg_data following power failure

2007-10-12 Thread Martijn van Oosterhout
ilesystems you're using crash safe? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] more problems with count(*) on large table

2007-10-02 Thread Martijn van Oosterhout
mething out of the OS cache is negligable compared to really going to disk. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] how to ignore invalid byte sequence for encoding without using sql_ascii?

2007-10-02 Thread Martijn van Oosterhout
porting is UTF-8? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Please change default characterset for database cluster

2007-09-30 Thread Martijn van Oosterhout
f reasons. Maybe somebody it will get fixed. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] How to avoid: 9.50184e+06

2007-09-28 Thread Martijn van Oosterhout
meric? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Autostart PostgreSQL in Ubuntu

2007-09-26 Thread Martijn van Oosterhout
staken about this. psql shouldn't have a reason to read > the server's PID file. Sounds to me like he didn't actually uninstall the Debian postgresql installation, which would leave a whole bunch of scripts lying doing all sorts of interesting things... Have a nice day, --

Re: [GENERAL] Filesystem crash - corupted database

2007-09-26 Thread Martijn van Oosterhout
ect the schema exactly as it was, and then copy the old files in place, you *may* be able to read them. However, you're going to have trouble with non-existing XIDs. Yo umight be able to recreate the XLOG/CLOGs but the whether it's going to be consistant is anyones guess... Have a

Re: [GENERAL] Duplicate public schema and user tables

2007-09-26 Thread Martijn van Oosterhout
the wraparound horizon 2 billion transactions ago. Please show us exactly what the logs say: Oh, and do you have any backups? > We're running PostgreSQL 8.0.1. Any help would be appreciated. You need to be running VACUUM... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROT

Re: [GENERAL] "not in" clause too slow?

2007-09-25 Thread Martijn van Oosterhout
IN produces a NULL *anywhere* it will always return FALSE, hence it often needs to scan the entire subquery even when an index might be better. You might know this cannot happen, but postgres can't always tell. NOT EXISTS doesn't have this problem. Blame the SQL standard if you like. --

Re: [GENERAL] queston about locking

2007-09-21 Thread Martijn van Oosterhout
at exclusive lock is probably too much. Why not just use SERLIALISED transaction mode, then your program won't see any changes, while other programs can still use it normally. That's how pg_dump generates consistant backups. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]>

Re: [GENERAL] a problem with pg_hba.conf

2007-09-19 Thread Martijn van Oosterhout
you reload the postmaster after making the changes? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] update command question?

2007-09-18 Thread Martijn van Oosterhout
uld i do to solve this problem? why this simple command can take > up > the most time? Maybe you are missing an index? In any case, you're going to have to provide *much* more information (at the very least an explain analyse of that statement) if you want any more detailed answer.

Re: [GENERAL] statements of an unfinished transaction

2007-09-18 Thread Martijn van Oosterhout
transaction time start, or any other helpful data ? pg_stat_activity has that, surely... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Locking entire database

2007-09-16 Thread Martijn van Oosterhout
can be very efficient about this because they can see rows that you can't; they go outside the normal visibility checks). Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his abili

Re: [GENERAL] strange TIME behaviour

2007-09-15 Thread Martijn van Oosterhout
lity issues to fixing this are tricky. Hope this helps, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Locking entire database

2007-09-14 Thread Martijn van Oosterhout
added the > property. Sounds like what you need is serializable transactions. Then the server will tell you if something conflicts. Have a ncie day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each accord

Re: [GENERAL] Cannot declare record members NOT NULL

2007-09-13 Thread Martijn van Oosterhout
bly completely wrong. If I were writing it I would ignore the attisnull flag altogether and assume that any column can be NULL. If you like you could use the typisnull column in pg_type, that *is* enforced since that's an actual constraint on the type. Have a nice day, -- Martijn van Oosterhout

Re: [GENERAL] Cannot declare record members NOT NULL

2007-09-12 Thread Martijn van Oosterhout
I know this information because the client is using the > "describe" feature of Postgresql to retrieve the types returned > by a statement. The describe clearly can't tell if the result is always going to be NULL or not. Have a nice day, -- Martijn van Oosterhout <[

Re: [GENERAL] Event-driven programming?

2007-09-12 Thread Martijn van Oosterhout
y, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] avg() of array values

2007-09-11 Thread Martijn van Oosterhout
postgres replaces the * with a 1, whic doesn't change the fact that the query is wrong. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Time Zone design issues

2007-09-10 Thread Martijn van Oosterhout
ezone (probably because there's no standard way of specifying it). However there is code on the web to give you a guess though, by using javascript to get time difference from UTC. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Statistics collection question

2007-09-10 Thread Martijn van Oosterhout
ock you showed is merely the transaction holding an exclusive lock on itself. As you can see, there is no database or relation mentioned, so it's not locking anything else. It has a shared lock on a table, but that's normal. For more info the activity, try "select * from pg_stat_activity;

Re: [GENERAL] cast time interval to seconds

2007-09-10 Thread Martijn van Oosterhout
86400 - CAST(start_time AS SECONDS)) > % 86400; At a guess I'd say you should simply subtract the two (ie stop_time - start_time) and then use extract() to pull the seconds out. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each accordi

Re: [GENERAL] Time Zone design issues

2007-09-10 Thread Martijn van Oosterhout
hatever you've configured the timezone to be. Have your webapp execute "set timezone = 'foo'" at the beginning of the session and everything will flow from there. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From eac

Re: [GENERAL] Time Zone design issues

2007-09-10 Thread Martijn van Oosterhout
ything is in my timezone, no matter where the machine is or whatever anyone else on the machine is doing. It's not magic, just someone 30 years ago making the smart choice. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each accord

Re: [GENERAL] Type cast text to int4

2007-09-07 Thread Martijn van Oosterhout
s and internal datatypes, which pl/pgsql can't do. What you're trying to do has been done before, so you should check the archives. In general though you should really just fix the source to produce valid SQL standard output. Have a nice day, -- Martijn van Oosterhout <[EMAIL PRO

Re: [GENERAL] Type cast text to int4

2007-09-07 Thread Martijn van Oosterhout
can use ''::text::myint which probably will call your cast function. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] psql hanging

2007-09-05 Thread Martijn van Oosterhout
ealous firewall dropping the RST packets in response to the keepalives?). Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Statistics collection question

2007-09-04 Thread Martijn van Oosterhout
able bloat. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] invalid byte sequence for encoding "UTF8": 0xff

2007-09-03 Thread Martijn van Oosterhout
ient_encoding". Well, the error is correct, that's not a valid UTF-8 character. I seem to remember someone saying that ooasionally windows puts BOMs in UTF-8 files (which is completely bogus). Check the file using a simple text editor a check if there are some odd characters at the beginn

Re: [GENERAL] Obtaining random rows from a result set

2007-09-01 Thread Martijn van Oosterhout
it has chance 2/3 of being kept. At row four it's 3/4. As you see, the numerators and denominators cancel, leaving 1/n at the end... Neat huh? -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according t

Re: [GENERAL] Obtaining random rows from a result set

2007-08-31 Thread Martijn van Oosterhout
distinct rows, which is different to just running the above set 5 times in parallel. I don't know if there's a similar method for median... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each

Re: [GENERAL] How to avoid "Seq Scans"?

2007-08-29 Thread Martijn van Oosterhout
needs adjusting. Also, your query can't use an index anyway, for that you'd need an index on (f2,f3). Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate.

Re: [GENERAL] Is there a better way to do this?

2007-08-28 Thread Martijn van Oosterhout
P WITHOUT TIME ZONE AS ' SELECT $1+$2*24*3600*''1 second''::INTERVAL; ' LANGUAGE 'sql'; Not sure if it qualifies as 'more concise' though. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Fro

Re: [GENERAL] Tables dissapearing

2007-08-28 Thread Martijn van Oosterhout
to reappear. Ofcourse, your indexes may be invalid, your constraints may be violated, but the data will still be there... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability

Re: [GENERAL] Out of Memory - 8.2.4

2007-08-27 Thread Martijn van Oosterhout
ystem. Another thing I havn't seen mentioned: you appear to be on a 32-bit architecture and with 2GB shared_buffers you've lost half your address space on that alone. Perhaps you simply don't have enough contiguous address space to alloc 512MB. Hope this helps, -- Martijn van Ooster

Re: [GENERAL] Tables dissapearing

2007-08-27 Thread Martijn van Oosterhout
views and also some > application level indices etc. Depends what you mean by too high. Anything with XID 1 and 2 is not a problem, and age returns a really big number for them. Can you give some examples? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.or

Re: [GENERAL] Tables dissapearing

2007-08-27 Thread Martijn van Oosterhout
uot;. On each database... As for debugging, maybe something like: select xmin, age(xmin) from pg_class; Just to check the wraparound issue... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each

Re: [GENERAL] create or replace for tables and schemas

2007-08-27 Thread Martijn van Oosterhout
r you. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Shared memory usage

2007-08-25 Thread Martijn van Oosterhout
the system manage the memory itself, if it needs it, it'll use it. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] "out of memory" error

2007-08-24 Thread Martijn van Oosterhout
On Fri, Aug 24, 2007 at 12:07:37PM +0300, Mikko Partio wrote: > On 8/23/07, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > > You've got it completely wrong. By setting shared_buffers to 2GB it > > means no-one can use it. It's not postgres that's running

Re: [GENERAL] "out of memory" error

2007-08-23 Thread Martijn van Oosterhout
ought >that the memory used for buffers and caches can be thought of as free >memory. Isn't this correct? Postgresql shared_buffers is not "free". It should be around your actually working set size, much bigger is counter productive. Have a nice day, -- Martijn

Re: [GENERAL] PG Seg Faults Performing a Query

2007-08-22 Thread Martijn van Oosterhout
ory for you, you need to avoid getting it in the first place. If you only want to display part of it, do a LIMIT . Or use a cursor to page through it. That said, it would be nice if it returned an error instead of crashing. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]>

Re: [GENERAL] PGError: input out of range

2007-08-20 Thread Martijn van Oosterhout
The only thing in your query that I can imagine being out of range is ACOS() which would need to be between -1 and 1 (otherwise the result would be complex). I'd try and see what the argument to the ACOS is, but it's probably some corner case where the rounding is getting you. Hope

Re: [GENERAL] Stripping apostrophes from data

2007-08-20 Thread Martijn van Oosterhout
y you just escape them or, if you don't want to worry about them at all, use queries with placeholders. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] pg_class.relfilenode for large tables

2007-08-20 Thread Martijn van Oosterhout
abase as it isn't an independant object. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Postgresql performance in production environment

2007-08-19 Thread Martijn van Oosterhout
processes lying around. You'll have to provide more detail about your system before getting any better recommendations. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ab

Re: [GENERAL] Repeat posts

2007-08-17 Thread Martijn van Oosterhout
m non-subscribers can get held for moderation. Because they CC the other people the thread kept going. Later on the moderator approves the messages and they get sent out again. Hope this help, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according

Re: [GENERAL] Some frustrations with admin tasks on PGSQL database

2007-08-17 Thread Martijn van Oosterhout
h, with 6million rows, it might even fit in memory. Can you see (in ps) what it's actually doing? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] [RESEND] Transaction auto-abort causes grief with Spring Framework

2007-08-17 Thread Martijn van Oosterhout
ent it... (Odd, I wouldn't have thought it was so difficult). Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] [RESEND] Transaction auto-abort causes grief with Spring Framework

2007-08-16 Thread Martijn van Oosterhout
t savepoint prior to execution.) Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Yet Another COUNT(*)...WHERE...question

2007-08-16 Thread Martijn van Oosterhout
ows Hope this helps, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Best practice for: ERROR: invalid byte sequence for encoding "UTF8"

2007-08-15 Thread Martijn van Oosterhout
would work though. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Best practice for: ERROR: invalid byte sequence for encoding "UTF8"

2007-08-15 Thread Martijn van Oosterhout
's no way you can "fix" the query. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] UDFs

2007-08-13 Thread Martijn van Oosterhout
to the right locations. If you can, I'd suggest installing binary versions of the contrib modules (it's called postgresql-8.2-contrib in debian for example). That saves you having to worry about sources, paths, compilations, etc). Have a nice day, -- Martijn van Oosterhout <[EMAIL PRO

Re: [GENERAL] UDFs

2007-08-13 Thread Martijn van Oosterhout
lly, what is probably the actual problem, at no point did you assign a length to the hash variable, ie VARLEN(hash)=foo. Hope this helps, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his abili

Re: [GENERAL] timestamp skew during 7.4 -> 8.2 upgrade

2007-08-12 Thread Martijn van Oosterhout
ened and you don't want it rotated, no matter what, you need "without". Hope this helps, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Reordering columns, will this ever be simple?

2007-08-08 Thread Martijn van Oosterhout
could provide useful savings on wide tables and multicolumn indexes, but you have to decouple logical and physical ordering to do it. But this is a thoroughly dead horse, lets not beat it up again. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ &g

Re: [GENERAL] backend process terminates

2007-08-08 Thread Martijn van Oosterhout
. FWIW, this document has lots of information about ELF shared libraries. http://people.redhat.com/drepper/dsohowto.pdf There's a lot of technical stuff that you can skip, but there is a lot of info about scopes and how they are resolved, common problems and how to fix them. Have a nice, --

Re: [GENERAL] Trigger not working as expected, first row gets a null value

2007-08-08 Thread Martijn van Oosterhout
onplace issue. It doesn't have to be repoducable, but the definition of the tables involves + the code of the trigger would help. I read your description three times and still couldn't quite work out exactly what the problem was or what you were expecting to happen... Have a nice day,

Re: [GENERAL] Reordering columns, will this ever be simple?

2007-08-08 Thread Martijn van Oosterhout
;s > said they'll be doing it yet and there are a lot of other more exciting ideas > too. Doubt it, patches to implement this have been submitted and rejected in the past. I don't see any reason why 8.4 would be any different. Have a nice day, -- Martijn van Oosterhout <[EMAIL

Re: [GENERAL] backend process terminates

2007-08-08 Thread Martijn van Oosterhout
unning "nm -D" over the main postgres executable and your libraries should give you an idea of the scope of the problem. Hope this helps, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Postgres 8.2 binary for ubuntu 6.10?

2007-07-12 Thread Martijn van Oosterhout
stgres team wants. For distributors "stable" means no behavioural changes, whereas the postgresql team does bug fixes, some of which definitly make behavioural changes that would make previously working programs break. Backports is usually a good compromise. Have a nice day, -- M

Re: [GENERAL] CASE in ORDER BY clause

2007-07-07 Thread Martijn van Oosterhout
asc/desc inside a case. > ... order by start_date desc, asc; > or > ... order by desc, start_date asc; Almost, it's actually: ... order by start_date desc, null asc; or ... order by null desc, start_date asc; Ordering by a constant has no effect, which is why it works. Have a nic

Re: [GENERAL] simple query question to use with DBI selectall_hashref

2007-07-05 Thread Martijn van Oosterhout
is stored as a hash. That can be done simple using: my $emps = $dbh->selectall_arrayref( "SELECT ename FROM emp ORDER BY ename", { Slice => {} } ); It's then an array rather than a hash, but that'

Re: [GENERAL] How to get fast ~ operator using C locale

2007-07-05 Thread Martijn van Oosterhout
27;t change it. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] ERROR: unexpected hash relation size:

2007-07-02 Thread Martijn van Oosterhout
nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] shmctl EIDRM preventing startup

2007-07-02 Thread Martijn van Oosterhout
s exposed under /proc somehow... If it's installed, this: lsof |grep SYSV Will list all processes attached to a SHM segemtn on the system. I think ipcs can do the same. You can grep /proc/*/maps for the same info. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> htt

Re: [GENERAL] Looking for help regarding getting the latest inserted sequence value.

2007-07-01 Thread Martijn van Oosterhout
nvoke triggers? And what view should they get? Does the trigger on the outer table get to see the effect of the nested insert, for example. I'm sure it will get done eventually, once the details have been sorted out. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]>

Re: [GENERAL] AutoVacuum Behaviour Question

2007-06-28 Thread Martijn van Oosterhout
tovacuum ignores temporary tables. And somehow you've got a temporary table that's been alive for hundreds of millions of transactions... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each acc

Re: [GENERAL] AutoVacuum Behaviour Question

2007-06-28 Thread Martijn van Oosterhout
2947120794 Whatever this table is, the freeze XID isn't getting updated for some reason... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] COPY to/from non-local file

2007-06-27 Thread Martijn van Oosterhout
h it. Hrm, in what sense doesn't it work well? Line-by-line means record-by-record. And writing a function to take an fd and do the work would be straightforward, or do you mean something else? Do you have any suggestions for improvement? Have a nice day, -- Martijn van Oosterhout <[EM

Re: [GENERAL] COPY to/from non-local file

2007-06-27 Thread Martijn van Oosterhout
In perl DBI is works like that, for C also, so probably from ruby also. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] dynamic table/col names in plpgsql

2007-06-26 Thread Martijn van Oosterhout
/python/etc...) Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] 8.2 contrib. "Full Disjunction"

2007-06-24 Thread Martijn van Oosterhout
On Sat, Jun 23, 2007 at 10:33:49PM +0100, Gregory Stark wrote: > "Martijn van Oosterhout" <[EMAIL PROTECTED]> writes: > > On Fri, Jun 22, 2007 at 07:38:01PM +0300, Tzahi Fadida wrote: > >> Let me simplify it in lamer terms. > >> Basically, you have a cyc

Re: [GENERAL] 8.2 contrib. "Full Disjunction"

2007-06-23 Thread Martijn van Oosterhout
FWIW, with this simple description I finally worked out what full disjunctions are and why you can't do them (efficiently) in SQL. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each acco

Re: [GENERAL] minimum function

2007-06-23 Thread Martijn van Oosterhout
I want to do is something like > > SELECT minimum(5,6) => 5 There are the functions int4larger/int4smaller. There are equivalent function for other types. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his a

Re: [GENERAL] B-tree fan-out

2007-06-23 Thread Martijn van Oosterhout
size > and each child node is stored in its own page. Is that correct? I beleive so, yes. Each branch is a page that points to many either branches or leaves. A leaf is also a page which can contain many keys, which reference tuples in the actual table. Have a nice day, -- Martijn van Oost

Re: [GENERAL] B-tree fan-out

2007-06-23 Thread Martijn van Oosterhout
. What is the size of such a pointer? > >I imagine it's a page number, probably just a 32-bit integer. > > > OK, thanks a lot. Do you know if other database systems implement > b-trees this way too? I.e. one page per node. No idea whatsoever. Have a nice day, -- Martijn van

Re: [GENERAL] B-tree fan-out

2007-06-23 Thread Martijn van Oosterhout
Bigs keys mean less. For integers you can fit an awful lot of keys. > In B-trees all non-leaf nodes have a bunch of pointers to its child > nodes. What is the size of such a pointer? I imagine it's a page number, probably just a 32-bit integer. Have a nice day, -- Martijn van

Re: [GENERAL] Surrogate VS natural keys

2007-06-20 Thread Martijn van Oosterhout
oices, games or scores it may be easier to reference the relatioship via a surrogate key rather than copying the other IDs around everywhere. For simple tables like this I generally don't bother, but sometimes I find myself adding a surrogate key later. Have a nice day, -- Martijn van Oos

Re: [GENERAL] Using the query INTERSECTion

2007-06-18 Thread Martijn van Oosterhout
ic one to be > built at runtime. The INTERSECT will almost certainly be slower, basically because all the joins will have to be processed twice. Also, the results won't be quite the same, especially with respect to duplicate records and NULLs. Have a nice day, -- Martijn van Oosterhout

Re: [GENERAL] about cursors

2007-06-16 Thread Martijn van Oosterhout
mean, suppose an > application opens a cursor and crashes. What happens to that cursor? Is > there a way to close idle cursors? Cursors are attached to the transactio and session, if either ends, the cursor dies with it... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]&g

Re: [GENERAL] changing the /tmp/ lock file?

2007-06-14 Thread Martijn van Oosterhout
the case. It is possible, you just have to realise that just like every postmaster has to listen on a different IP, they also all need to listen to a different socket directory. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each ac

Re: [GENERAL] [SQL] function to find difference between in days between two dates

2007-06-14 Thread Martijn van Oosterhout
of hits on google :) Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] [SQL] function to find difference between in days between two dates

2007-06-14 Thread Martijn van Oosterhout
t though. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] how to speed up query

2007-06-12 Thread Martijn van Oosterhout
in. Now, you may argue that in your case this doesn't apply, which may be true, but it's always been a difficult construct to optimise... (and somewhat surprising for people with they didn't realise the null-effect). The most efficient way you write this is with an OUTER JOIN

Re: [GENERAL] INSERT ... RETURNING in v8.2

2007-06-12 Thread Martijn van Oosterhout
d out I think) > Amk I doing anything wrong or is there some missing sentence in the > documentation? When the docs talk about an "expression" they don't mean aggregates, since they are not functions in the ordinary sense. Hope this helps, -- Martijn van Oosterhout <

Re: [GENERAL] transaction problem using cursors

2007-06-11 Thread Martijn van Oosterhout
RE "CUSTOMERS"."ZIP" >= '1' AND "CUSTOMERS"."ZIP" < '2' That will produce the same result, but without any chance of errors... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://sv

Re: [GENERAL] gist index on cube column

2007-06-10 Thread Martijn van Oosterhout
. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

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