Re: indexes on varchar fields

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Nixon <listuser(at)peternixon(dot)net>
Cc: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>, pgsql-general(at)postgresql(dot)org
Subject: Re: indexes on varchar fields
Date: 2002-12-12 16:41:06
Message-ID: 19751.1039711266@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Nixon <listuser(at)peternixon(dot)net> writes:
> 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

You need another backslash --- the string-literal parser is eating that
one, so Perl sees s/^.*//.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-12-12 16:49:57 Re: installing with readline
Previous Message Johnson, Shaunn 2002-12-12 16:37:41 Re: installing with readline