NULLs vs. NOT IN()

2008-08-13 10:58:59 CEST | 16 Comments | Tags: , ,

Friend of mine found something that he thought looked like a bug in Pg.

Very simple query:

select * from table where id not in (select field from other_table)

was not returning any rows, despite the fact that there definitely are some “ids” that are not in other_table.field. Why is that?

- MORE -

Waiting for 8.4 - case insensitive text ( citext )

2008-08-10 18:40:48 CEST | 4 Comments | Tags: , , , , ,

On 29th of July, Tom Lane committed patch written by David E. Wheeler, which added new contrib module: citext.

- MORE -

Waiting for 8.4 - UNION / INTERSECT / EXCEPT

2008-08-10 17:04:57 CEST | 5 Comments | Tags: , , , , ,

During last month or so, Tom Lane commited changes in PostgreSQL, which were foundations for adding hash-based versions of popular features.

I already described first such feature - DISTINCT.

Now, there were 3 more commits which were related to this:

- MORE -

Removing elements from arrays

2008-08-06 20:02:42 CEST | 2 Comments | Tags: , , , ,

Cezio wrote post about removing elements from arrays in PostgreSQL.

Unfortunately his blog engine requires registration before comment, which I don’t like, so I decided to comment using my own blogspace.

- MORE -

Waiting for 8.4 - hash based DISTINCT

2008-08-05 11:39:20 CEST | No Comments | Tags: , ,

Today Tom Lane committed patch which gives DISTINCT ability to use hash aggregate - just like GROUP BY.

- MORE -

Waiting for 8.4 - RETURNS TABLE

2008-08-04 14:21:53 CEST | 1 Comment | Tags: , , , , ,

Pavel Stehule wrote, and Tom Lane committed patch which ads new syntax for set-returning functions: “RETURNS TABLE”.

- MORE -

Writing sprintf, and overcoming limitations in pl/perl

2008-08-01 12:44:17 CEST | 2 Comments | Tags: , , , ,

Having new VARIADIC functions, I decided it would be cool to be able to write sprintf() function.

Basically the idea is simple, plperl function, which takes “format”, and list of arguments and returns generated output.

- MORE -

Waiting for 8.4 - variadic functions

2008-07-31 15:14:15 CEST | No Comments | Tags: , , ,

Pavel Stehule wrote, and then Tom Lane committed (on 16th of July), patch which adds to PostgreSQL support for functions with variable number of arguments.

- MORE -

Waiting for 8.4 - storage types for table columns

2008-07-30 15:28:58 CEST | 1 Comment | Tags: , , , , ,

Gregory Stark wrote, and Bruce Momjian committed (on 14th of July) patch which shows storage type in psql.

- MORE -

Waiting for 8.4 - sequence details

2008-07-30 15:17:20 CEST | 1 Comment | Tags: , , ,

On 15th of July, Bruce Momjian commited patch written by Dickson S. Guedes, which:

Have psql \d show the value of sequence columns.

- MORE -