On Sat, Apr 28, 2012 at 17:20, Ryan Kelly <rpkell...@gmail.com> wrote:
> I don't think any language supports the empty key edge case in this way. > The only language I know of that will let you get away with it is Perl, > and in that case you get undef, not the empty string, and it's a warning > if you have warnings on: > > $ use warnings; > $ my $h = { 1 => }; > Odd number of elements in anonymous hash Well... kind of but not really, perl (as usual) is a bit funky here. Try it with more than one key. What ends up happening is the 2nd key is used as the first keys value... Surprise! You also don't get the warning, it sees 1=>2,(void) or something. $ perl -E 'my $h = {1=>,2=>}; say $h->{1};' 2 Anyway, +1 for what tom proposed. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs