| From: | "Peter Gibbs" <peter(at)emkel(dot)co(dot)za> |
|---|---|
| To: | "\"Peter Nixon\"" <listuser(at)peternixon(dot)net> |
| Cc: | <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: indexes on varchar fields |
| Date: | 2002-12-12 14:03:31 |
| Message-ID: | 025601c2a1e7$4111d440$0b01010a@emkel.co.za |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | James F | 2002-12-12 14:13:14 | Re: Is it possible to Import tables and its data from Ms Access |
| Previous Message | Adrian Klaver | 2002-12-12 13:37:40 | Re: Is it possible to Import tables and its data from Ms Access |