Skip site navigation (1) Skip section navigation (2)

Re: Typed hstore proposal

From: Benedikt Grundmann <bgrundmann(at)janestreet(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Johann 'Myrkraverk' Oskarsson <johann(at)2ndquadrant(dot)com>,PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Typed hstore proposal
Date: 2011-12-22 15:51:48
Message-ID: 20111222155148.GW7768@ldn-qws-004.delacy.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 22/12/11 10:44, Tom Lane wrote:
> "Johann 'Myrkraverk' Oskarsson" <johann(at)2ndquadrant(dot)com> writes:
> > I mean to create a typed hstore, called tstore for now.
> 
> Um ... what is the point of this, exactly?  From what I've seen, most
> applications for hstore are pretty happy with the fact that hstore is
> only weakly typed, and if an entry *is* an integer, or a float, or
> whatever else, it's not hard to cast to and from text as needed.

More over it is also easy with the current hstore to add constraints like this:

  "contracts_is_an_integer" CHECK ((tags -> 'contracts'::text) ~ '^[0-9]+$'::text)

to ensure that it actually is.

In response to

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2011-12-22 16:16:25
Subject: Re: Page Checksums + Double Writes
Previous:From: Oleg BartunovDate: 2011-12-22 15:48:03
Subject: Re: Real-life range datasets

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group