Bug in my ( newbie ) mind?
| От | Dan Lyke |
|---|---|
| Тема | Bug in my ( newbie ) mind? |
| Дата | |
| Msg-id | 14995.23099.624012.744494@wynand.flutterby.com обсуждение исходный текст |
| Ответ на | Bug in my ( newbie ) mind? (Christopher Sawtell <csawtell@xtra.co.nz>) |
| Ответы |
Re: Bug in my ( newbie ) mind?
|
| Список | pgsql-general |
Christopher Sawtell writes: > chris=# select phone_prefix.prefix order by random() limit 1 || '-' || > lpad((random()*10000)::int, 4, '0')::text as "Phone Number"; > ERROR: parser: parse error at or near "||" This sure won't fix everything, but at the very least you need to parenthesize that first select clause inside another select. For instance, this works: select (select '123'::text) || (select '456'::text); So one might think that, with appropriate casting, something more like: select (select phone_prefix.prefix order by random() limit 1) || ... would be more likely to work (modulo some casting and such). Dan
В списке pgsql-general по дате отправления: