<operationsengineer1@yahoo.com> writes:
> my apologies again. datatype was text in 7.4 and
> varchar in 7.3... the database likely isn't the
> cause, rather, my different datatypes is probably the
> problem.
You could do
ORDER BY varcharcolumn::text::integer;
Experimenting, it looks like 8.0 will allow the direct cast but 7.4 and
7.3 not.
regards, tom lane