Re: Parser emits mysterious error message for very long tokens - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Parser emits mysterious error message for very long tokens
Date
Msg-id 884.1441978290@sss.pgh.pa.us
Whole thread Raw
In response to Parser emits mysterious error message for very long tokens  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: Parser emits mysterious error message for very long tokens  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
> Hello, this is a problem on an extreme situation.
> When parser encounters very long tokens, it returns an error
> message which should be mysterious for users.

>> $ perl -e "print \"select '\" . \"x\"x(512*1024*1024) . \"'\"" | psql postgres
>> ERROR:  invalid memory alloc request size 1073741824

I can't get terribly excited about that, because there is not that
much daylight between there and where the query fails because the
entire input string exceeds 1GB.  Moreover, anyone who tries working
with literals in this size range will soon learn not to ;-).  So
it seems quite an artificial example to me ...
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: WIP: Rework access method interface
Next
From: Jan Wieck
Date:
Subject: Double linking MemoryContext children