Re: [SQL] casting character varying to integer - order by numeric

2005-10-20 Thread Bryce Nesbitt (mailing list account)
Cool, thanks. PostgreSQL 7.4.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-20) Richard Huxton wrote: SELECT version(); ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] casting character varying to integer - order by numeric

2005-10-20 Thread Bryce Nesbitt (mailing list account)
Tom Lane wrote: But postgres 7 rejects this with "ERROR: cannot cast type character varying to integer". As a general rule, you need to be more specific than that about which version you are working with ;-) You may find that username::text::integer will work, depending on