Re: SELECT substring with regex

Поиск
Список
Период
Сортировка
От T E Schmitz
Тема Re: SELECT substring with regex
Дата
Msg-id 44AFD1DF.8010102@numerixtechnology.de
обсуждение исходный текст
Ответ на Re: SELECT substring with regex  ("Aaron Bono" <postgresql@aranya.com>)
Список pgsql-sql
Aaron Bono wrote:
> On 7/7/06, *T E Schmitz* <mailreg@numerixtechnology.de 
> <mailto:mailreg@numerixtechnology.de>> wrote:
> 
> 
>     I am trying to come up with a semi-automatic solution to tidy up some
>     data. If it's got to be done manually via the GUI it would mean a lot of
>     dummy work [for the customer].
> 
> 
> I would recommend you alter the GUI to NOT allow any more bad data to 

I absolutely agree that the user should not be able to enter 'bad' data 
in the first place.
However, in this case it is not a hard and fast rule, rather a 
suggestion how to organize the data sensibly. The pattern is suitable 
for 98% of the lenses; there are some, albeit very few, exceptions.

Also: the MODEL.NAME is a free-form field; only when referred to by a 
PRODUCT which is of CATEGORY 'Lens', would the pattern apply.

The only way one could maybe assist the user would be a warning when he 
tries to save a 'Lens' PRODUCT, which deviates from the pattern.

> You might also consider adding the base and suffix columns with a 
> trigger that parses the name field and sets the values of base and 
> suffix and also does any integrity checks during inserts and updates.  
> Finally, after the data is cleaned up and the client apps are changed to 
> use base and suffix and not name, get rid of the name column.

The suffix should have been entered in TYPE.NAME, which references 
MODEL. The structure exists, it just needs to be used efficiently.

-- 


Regards,

Tarlika


В списке pgsql-sql по дате отправления:

Предыдущее
От: Richard Broersma Jr
Дата:
Сообщение: Re: Celko's Puzzle Number 5
Следующее
От: "Rodrigo De Leon"
Дата:
Сообщение: Re: SELECT substring with regex