Do we need LIMIT clause in UPDATE and DELETE statements for PostgreSQL?

Was working with MySQL recently. Noticed that UPDATE command of it has special LIMIT clause which is really useful as for me, e.g.

UPDATE `Product_download` SET `version`='9.2.1' WHERE `product_download_id`=367 LIMIT 1;


CHM-help for PostgreSQL 9.0

 CHM IconBy the nature of my work, I use PostgreSQL manuals very often since the 8.x versions. And if for earlier versions it is possible to download CHM help file, for version 9.0 that’s not possible.

Quick answer why it’s unbearable to use online version – PostgreSQL manual consists of the 1036 topics and I don’t like search engine on the site at all. It is also worth noting that the tree of contents in CHM version speeds up navigation a lot!

Good friend of mine, colleague, passionate fan of Perl Edward Smirnov obsessed with creating a utility capable to compile the help in CHM format using a set of HTML / SGML files shipped with PostgreSQL. He managed this! The only thing missing is the Index (HHK file in CHM archive) support.

However, even without this feature such manual a hundred times more comfortable for me than the online counterpart. Especially I’m excited about lightning full-text searches.

We’ve put PostgreSQL 9.0 CHM manual at PgMDD and PostgresDAC download pages, welcome to download it from here, or there.

Poll: ALTER TYPE enumtype ADD <what?> ‘newlabel’

Yesterday, Hubert ‘depesz’ Lubaczewski wrote a post about new functionality in PostgreSQL 9.1.

In a few words we will have the ability to add new values to the existing ENUM type defined earlier. Thanks God!

However, Andrew Dunstan proposed to use another syntax for it:

ALTER TYPE enumtype ADD LABEL ‘newlabel’

The discussion was hot. Brendan Jurd wanted previous syntax, Tom Lane proposed substitution VALUE for LABEL, Pavel Stehule made a suggestion for ELEMENT etc.

What term sounds good for you, friend?

Poll: Do we need SET type in PostgreSQL?

This topic is discussed again and again with huge friend of mine and MySQL sectarian. 🙂 And must confess I agree with him in this particular point of view.

For me it’s strange that such powerful database as PostgreSQL, which has a lot of drums and whistles inside, doesn’t support SET types. Especially when we have ENUM support now!

Of course one may say that this functionality can be implemented using Bit String Types. But where is the joy of power? Where is the crystal clarity of the SQL script? 🙂

What’s you opinion, postgresman?

PS Don’t hesitate to share your thoughts in the comments.

Poll: Football vs Soccer

Continue reading “Poll: Football vs Soccer”

My first poll… BLOB storing

PS Decided to check Poll functionality.