Re: Feeding results back into select
| От | D'Arcy J.M. Cain |
|---|---|
| Тема | Re: Feeding results back into select |
| Дата | |
| Msg-id | 20080823084020.16e8ebe4.darcy@druid.net обсуждение исходный текст |
| Ответ на | Re: Feeding results back into select (Teodor Sigaev <teodor@sigaev.ru>) |
| Список | pgsql-hackers |
On Sat, 23 Aug 2008 14:04:30 +0400
Teodor Sigaev <teodor@sigaev.ru> wrote:
> >> select 'a'=>'b';
> >> ?column?
> >> ----------
> >> "a"=>"b"
> "a"=>"b" is a value of hstore type, so query should be:
> select '"a"=>"b"'::hstore;
Of course. Now that I understand it's blindingly obvious that the
double quotes above are part of the string and the insert would be; INSERT INTO table (hfield) VALUES ('"a"=>"b"');
> " character was chosen to simplify escaping,
To prevent; INSERT INTO table (hfield) VALUES ('''a''=>''b''');
I guess my brain was pointed elsewhere when I asked. Thanks for not
treating me like an idiot. :-)
--
D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
В списке pgsql-hackers по дате отправления: