Thanks Ken! I missed that option going through the documentation.
>
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
On 03/26/2013 06:08 AM, James Sharrett wrote:
I'm trying remove all instances of non-alphanumeric or underscore
characters from a query result for further use. This is part of a
function I'm writing that is in plpgsql
Examples:
Original value
'My text1'
'My text 2'
'My-text-3'
On Tue, Mar 26, 2013 at 09:13:39AM -0400, James Sharrett wrote:
> Sorry, caught a typo. Mytext1 is correctly replaced because only one
> instance of the character (space) is in the string.
>
> This deals with the correct characters but only does the first instance of
> the character so the output
Sorry, caught a typo. Mytext1 is correctly replaced because only one
instance of the character (space) is in the string.
This deals with the correct characters but only does the first instance of
the character so the output is:
'Mytext1'
'Mytext 2' (wrong)
'Mytext-3' (wrong)
'M
I'm trying remove all instances of non-alphanumeric or underscore characters
from a query result for further use. This is part of a function I'm writing
that is in plpgsql
Examples:
Original value
'My text1'
'My text 2'
'My-text-3'
'My_text4'
'My!text5'
Desired
'Myt
2013/3/26 Pavel Stehule :
> Hello
>
> 2013/3/26 Ben Morrow :
>> Quoth pavel.steh...@gmail.com (Pavel Stehule):
>>> Dne 25.3.2013 23:51 "Ben Morrow" napsal(a):
>>> >
>>> > I would use a view for this:
>>> >
>>> > create view vale_any as
>>> > select 'P'::text "type", v.adiant, v.desc_per, v
Hello
2013/3/26 Ben Morrow :
> Quoth pavel.steh...@gmail.com (Pavel Stehule):
>> Dne 25.3.2013 23:51 "Ben Morrow" napsal(a):
>> >
>> > I would use a view for this:
>> >
>> > create view vale_any as
>> > select 'P'::text "type", v.adiant, v.desc_per, v.cod
>> > from valepag v
>> >