Re: indexes on varchar fields

Поиск
Список
Период
Сортировка
От Peter Gibbs
Тема Re: indexes on varchar fields
Дата
Msg-id 025601c2a1e7$4111d440$0b01010a@emkel.co.za
обсуждение исходный текст
Ответ на Re: indexes on varchar fields  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Список pgsql-general
Peter Nixon wrote:

> radius=# create function testperltest3 (text) returns text as '
> radius'#         my $datetime = $_[0];
> radius'#         # Remove . from the start of time fields (routers that
have
> lost ntp timesync)
> radius'#         $datetime =~ s/^\.*//;
> radius'#         return $datetime;
> radius'# ' language 'plperl';
> CREATE FUNCTION
> radius=# select testperltest3('.16:46:02.356 EET Wed Dec 11 2002');
>  testperltest3
> ---------------
>
> (1 row)

The backslash is being treated as an escape character by Postgres when the
function is created, and hence is not present in the actual function code.
Try doubling it.
--
Peter Gibbs
EmKel Systems


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Is it possible to Import tables and its data from Ms Access
Следующее
От: "James F"
Дата:
Сообщение: Re: Is it possible to Import tables and its data from Ms Access