From: Francis Solomon <francis@stellison.co.uk>
To: Borek Lupomìský <borekl@volny.cz>
To: pgsql-sql@postgresql.org
Subject: RE: SQL parse error
Date: Tue, 12 Dec 2000 10:21:52 -0000
Message-ID: <NEBBIFFPELJMCJAODNPKKEMICDAA.francis@stellison.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.21.0012121036260.26258-100000@diaspar.ujep.cz>
Hi Borek,
What version of PostgreSQL are you using? This works fine for me on
7.02. Time to update, maybe?
Hope this helps
Francis
>
> Hello all,
>
> My following problem is:
>
> swports=# select substring(cp from 1 for 4)::int4 from out2cp;
> ERROR: pg_atoi: error in "6.1,": can't parse ".1,"
>
> SQL syntax is apparently OK. When I omit the typecast, the query
> works:
>
> swports=# select substring(cp from 1 for 4) from out2cp;
> substr
> --------
> 3182
> 3182
> 3182
> -8<- text deleted ---
>
> The cp entries are varchars in form NNNN.N, where N is numeral.
> So can someone explain why the parse error?
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: francis@stellison.co.uk, borekl@volny.cz
Subject: Re: SQL parse error
In-Reply-To: <NEBBIFFPELJMCJAODNPKKEMICDAA.francis@stellison.co.uk>
References: <Pine.LNX.4.21.0012121036260.26258-100000@diaspar.ujep.cz> <NEBBIFFPELJMCJAODNPKKEMICDAA.francis@stellison.co.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox