Bruno Wolff III <bruno@xxxxxxxx> writes: > No, it has to be inside the function so that the modular arithmetic is > applied to it. Then there's the error I've shown from your command. Can you give me a working one? This was with PostgreSQL 8.2.3. -- Jorge Godoy <jgodoy@xxxxxxxxx>