two field table: field1, field2, how to add a third one with the auto-generated value replace(field2,'channel','AAAA')? - Mailing list pgsql-general

From zxo102 ouyang
Subject two field table: field1, field2, how to add a third one with the auto-generated value replace(field2,'channel','AAAA')?
Date
Msg-id 73ccced30912121805s69678637hfea4bf515d9d5597@mail.gmail.com
Whole thread Raw
Responses Re: two field table: field1, field2, how to add a third one with the auto-generated value replace(field2,'channel','AAAA')?  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
Hi evreyone,
   I have a table with two fields
 
   field1    field2
    1         1channel
    2         2channel
    3         3channel
 
Now I want to add the third one with the value replace(field2,'channel','AAAA') like
 
   field1    field2           field3
    1         1channel    replace(field2,'channel','AAAA')
    2         2channel    replace(field2,'channel','AAAA')
    3         3channel    replace(field2,'channel','AAAA')
 
The field3 must be done automatically after a user input data into field1 and field2.
 
Any ideas?   Thanks a lot.
 
ouyang

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: how can i change encoding in template1 DB?
Next
From: Scott Marlowe
Date:
Subject: Re: two field table: field1, field2, how to add a third one with the auto-generated value replace(field2,'channel','AAAA')?