Re: Using a preprocessor for constants in SQL

Поиск
Список
Период
Сортировка
От Arthur van Dorp
Тема Re: Using a preprocessor for constants in SQL
Дата
Msg-id 4203817A.9090909@gmx.net
обсуждение исходный текст
Ответ на Re: Using a preprocessor for constants in SQL  (Frank Bax <fbax@sympatico.ca>)
Ответы Re: Using a preprocessor for constants in SQL  (Arthur van Dorp <arthur_vd@gmx.net>)
Список pgsql-novice
> If you change the length of fields between testing and production, it
>  would invalidate your boundary testing!  What if there is a bug in
> your code that presents itself when a field is 200 characters, but
> not when it is 50 characters long?  There is no difference in disk
> usage with the example you gave, so I can see no reason to have
> different lengths for varchar fields between test and prod
> environments.

Uh, ok, bad wording. It's more about easily changing the values during
testing so that I can use the refined code to deploy it. So it's about
ease of change during development, not in the production stage.

But it would be useful even for boundary testing. You can have one
central point to define a few constants and wont forget to adjust them
if you one day decide to change your code.

Thanks

Arthur


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

Предыдущее
От: Frank Bax
Дата:
Сообщение: Re: Using a preprocessor for constants in SQL
Следующее
От: "Oisin Glynn"
Дата:
Сообщение: Re: Calling psql from a bat file on windows?