pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
parse bug
2+ messages / 2 participants
[nested] [flat]

* parse bug
@ 2002-11-11 19:25 floyds@4peakstech.com
  2002-11-12 14:10 ` Re: parse bug Achilleus Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 1 reply; 2+ messages in thread

From: floyds@4peakstech.com @ 2002-11-11 19:25 UTC (permalink / raw)
  To: pgsql-sql


seems like an error in the sql parser to me:

# create table test (acol smallint[]);
CREATE
# insert into test (acol) values ('{ 0 }');
ERROR:  pg_atoi: error in "0 ": can't parse " "
# insert into test (acol) values ('{ 0}');
INSERT 28472 1

the only difference is the trailing " " after the 0;


Regards,

Floyd Shackelford
4 Peaks Technology Group, Inc.
VOICE: 334.735.9428
FAX:   916.404.7125
EMAIL: FloydS@4PeaksTech.com
ICQ #: 161371538

acta non verba





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: parse bug
  2002-11-11 19:25 parse bug floyds@4peakstech.com
@ 2002-11-12 14:10 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Achilleus Mantzios @ 2002-11-12 14:10 UTC (permalink / raw)
  To: floyds@4peakstech.com; +Cc: pgsql-sql

On Mon, 11 Nov 2002 floyds@4peakstech.com wrote:

>
> seems like an error in the sql parser to me:
>
> # create table test (acol smallint[]);
> CREATE
> # insert into test (acol) values ('{ 0 }');
> ERROR:  pg_atoi: error in "0 ": can't parse " "
> # insert into test (acol) values ('{ 0}');
> INSERT 28472 1
>
> the only difference is the trailing " " after the 0;

traditionally atoi ignores only leading spaces, so
insert into test (acol) values ('{                 0}');

should work too.

btw why do you need trailing spaces for??

>
>
> Regards,
>
> Floyd Shackelford
> 4 Peaks Technology Group, Inc.
> VOICE: 334.735.9428
> FAX:   916.404.7125
> EMAIL: FloydS@4PeaksTech.com
> ICQ #: 161371538
>
> acta non verba
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>

==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-11-12 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-11 19:25 parse bug floyds@4peakstech.com
2002-11-12 14:10 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>

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