Archiwizowane July, 2007

for the long time everybody knew that you can't use index on "LIKE" operations. then came text_pattern_ops, so we could use indexes for prefix searches: # \d depesz_test ...

how many times did you (or somebody in your environment) did something like this? update (or delete) without proper "where"? it happened at least couple of times to me. of course - using transactions solved the problem. but - on the other ...

i have been given a machine with 2 discs (2x 160gb, sata), linux debian 4.0 and a task to make it run as raid1. in the begining layout was simple: disc: /dev/sda had 2 partitions: sda1 - 2gb, swap sda2 - rest of disc, ...

July 10th, 2007 by depesz | Tags: , | 2 comments »

mage_ from #postgresql had interesting problem today. he has a table with 2 date fields, and he wants to have list of all years from both fields. together. as one list. his approach: select date_part('year', date1) from test union select date_part('year', date2) from test; is hardly ...

some time ago skype released some tools for postgresql that they developed. one of the released tools is londiste - simple replication system. it is master to multiple slaves, without cascading. the problem with skype projects is that documentation is not as ...

i was informed that jan wieck wrote another function which does cumulative sum - using cursors and srf's to get the same result. i checked it, and here are the results.

July 8th, 2007 by depesz | Tags: | 4 comments »

i found lately quite interesting issue. how to calculate cumulative_sum across some dataset. if you will search for cumulative sum, you will find some answers. most of them revolve around using subselect or join. so, how to calculate it?

some time ago i wrote a piece on values(),() in postgresql 8.2, saying that multi-row inserts are very fast. some people said that my benchmark is pretty useless as i didn't take into consideration transactions. others asked me to translate the text ...

July 4th, 2007 by depesz | | 13 comments »

i'm looking for hosting provider. what i need is basically virtual server, on separate ip (i'd like to put there some non-web servers, like smtpd, and doing so without separate ip can/will be tricky). other needs - up to 50g of ...

July 3rd, 2007 by depesz | Tags: | 7 comments »

uwaga - ta metoda jest tylko i wyłącznie dla postgresql'a, gdyż wykorzystuje niestandarodwy typ danych obecny (jako moduł w contribie) jedynie w postgresie. jak ltree działa nie będę opisywał bo od tego jest manual do ltree. baza do ltree jest trywialna, przykładowo, ...