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.

About these ads

Nerd.

Tagged with: , , , , , , , ,
Posted in Polls, PostgreSQL
7 comments on “Poll: Do we need SET type in PostgreSQL?
  1. I assume by “set” you mean “just like an array but unordered and without duplicates” or “just like a unary relation”. So, a “set” type is useful just as a shorthand or more efficient implementation of said.

    But if by “set” you mean “pick multiple values from an enumerated list”, then I would say just do what I said in the first paragraph and people can use an enumerated type as the element type of the set rather than say integer or text or whatever.

    • pashagolub says:

      I’m not sure that treat you right. :)

      A set is a collection of values of the same ordinal type (enums, integers). The values have no inherent order, nor is it meaningful for a value to be included twice in a set.

      • Yes, a set is an unordered collection of values with each value only appearing once.

        But a better, more general solution is to just support nesting relations in relations. Which MULTISET essentially does, though in a more contrived manner by having different operators for MULTISET as for base tables.

  2. David Fetter says:

    If we’re going to get something, why not MULTISET, which is in the standard?

  3. Lee Reynolds says:

    It seems to me that developers of a database system would mimic the popular functionality of their competitor’s products almost as a matter of course.. If customers want something, and it doesn’t break something else or otherwise cause serious problems, then they should get it. Otherwise they’ll find a database vendor who will give it to them.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
Map of wandering
Follow

Get every new post delivered to your Inbox.

Join 78 other followers

%d bloggers like this: