Re: Using a preprocessor for constants in SQL

From: Arthur van Dorp <arthur_vd(at)gmx(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Cc: Frank Bax <fbax(at)sympatico(dot)ca>
Subject: Re: Using a preprocessor for constants in SQL
Date: 2005-02-04 14:06:50
Message-ID: 4203817A.9090909@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Oisin Glynn 2005-02-04 14:18:47 Re: Calling psql from a bat file on windows?
Previous Message Bruno Wolff III 2005-02-04 13:59:49 Re: Storing latitude and longitude