Re: Update HSTORE record and then delete if it is now empty - What is the correct sql?

Поиск
Список
Период
Сортировка
От Ian Lawrence Barwick
Тема Re: Update HSTORE record and then delete if it is now empty - What is the correct sql?
Дата
Msg-id CAB8KJ=iO7V5n4bPRJqec1UL84B7ofs_cd_+DjHibEbpa4jUt9w@mail.gmail.com
обсуждение исходный текст
Ответ на Update HSTORE record and then delete if it is now empty - What is the correct sql?  (Ashwin Jayaprakash <ashwin.jayaprakash@gmail.com>)
Ответы Re: Update HSTORE record and then delete if it is now empty - What is the correct sql?  (Ashwin Jayaprakash <ashwin.jayaprakash@gmail.com>)
Список pgsql-sql
2013/2/23 Ashwin Jayaprakash <ashwin.jayaprakash@gmail.com>:
(...)
>
> Q2: What the best way to check if an HSTORE is empty? Is this it
> "array_length(akeys(data), 1) is null"?

Just a quick answer to your second question: I suspect it might be more
efficient to check your HSTORE column against an empty HSTORE, e.g.
 WHERE val = ''::HSTORE

HTH

Ian Barwick



В списке pgsql-sql по дате отправления:

Предыдущее
От: Bryan L Nuse
Дата:
Сообщение: Re: Summing & Grouping in a Hierarchical Structure
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Update HSTORE record and then delete if it is now empty - What is the correct sql?