Archiwizowane August, 2007

August 31st, 2007 by depesz | Tags: , , , , | 3 comments »

faber4 on irc asked about how to get ascii-based sorting, while his postgresql was initdb'ed with utf-8 based locale (en_US.UTF-8 to be exact). what can we do about it?

some time ago merlin moncure wrote about one of new features of postgresql 8.2 - row-wise comparison. i also read about it, but at first didn't find anything very useful about it - after all it doesn't give you any new ...

August 29th, 2007 by depesz | Tags: , | 8 comments »

luckymurali_81 on freenodes #postgresql had a problem. his query returns data in wrong order. what can we do about it?

August 25th, 2007 by depesz | | No comments »

ostatnio testowałem interesujący i dosyć prosty pomysł na jedzonko. zaczęło się od tego, że przypadkiem usłyszałem w telewizji opis jakiejś potrawy: "to jest pieczona ryba (tu była jakaś nazwa, ale jej nie znam) marynowana w sake z syropem klonowym, zwróćcie uwagę ...

August 25th, 2007 by depesz | Tags: | No comments »

Bugfixes: set locale to C for sorting - otherwise sort results will not be really sorted (let's everybody "thank" locale subsystem) fix a bug that prevented *last* sql-type to be printed Changes: add rule for normalizing so: SELECT * FROM table WHERE field = ...

August 24th, 2007 by depesz | Tags: , | 5 comments »

let's imagine simple situation - you have postgresql server. configuration was fine-tuned, hardware is ok. yet the system is not really as fast as it should. most common problem - slow queries. second most common problem - fast queries, but too many ...

August 18th, 2007 by depesz | Tags: | 28 comments »

now, some time ago i wrote about how to "hack" system with postgresql. today i'll write more about how to make pg database as safe as possible. i'll go through several steps, tell you what's possible, what's easy, and what is ...

one of the nice (for some things) features of oracle is rownum() function. i assume you know what it does - if you don't - i think a quick google will show it. today i will show how to make rownum in ...

August 12th, 2007 by depesz | Tags: | 15 comments »

< french translation is now available > very recently i got a task which involved finding out what happened (what sql queries were called) on remote machine. the problem was that i didn't have any kind of shell access to server - ...

August 11th, 2007 by depesz | Tags: | No comments »

i tend to use more (than standard) informative prompts. whether it's shell, or psql i set it up to match my needs. for the longest time i used psql prompt: \set PROMPT1 '(%n@%M:%>) %`date +%H:%M:%S` [%/] %[%012%]%x%# ' (this line should be in .psqlrc). it ...