changing partial data

From: Peter Choe <choepete(at)mindspring(dot)com>
To: postgres <pgsql-general(at)postgresql(dot)org>
Subject: changing partial data
Date: 2001-07-11 17:48:01
Message-ID: 3B4C9151.1B46EA8C@mindspring.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

is there a way in postgres to change just a part of a text data in a
column. for example if i have a column called description with the
following data:

+---------------------+
| description |
+---------------------+
| this is a test. |
+---------------------+

and i want to change the word test to exam, can i just replace the word
test rather than reentrying to who value of the column?

so, instead of:

update foo set description='this is a exam' where description='this is a
test';

can i do something like:

update foo replace test with exam;

peter choe

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thalis A. Kalfigopoulos 2001-07-11 18:03:23 Re: Set priority for requests
Previous Message Steve Wolfe 2001-07-11 17:47:44 Re: Performance tuning for linux, 1GB RAM, dual CPU?