On Mon, Jan 4, 2016 at 6:14 PM, Robert Haas <robertmh...@gmail.com> wrote:
> On Mon, Jan 4, 2016 at 11:48 AM, Shulgin, Oleksandr > > > > postgres=# select pg_size_bytes(''); > > ERROR: invalid input syntax for type numeric: "" > > I think that's a pretty bad error message. I mean, the user is > calling a function that takes text as an input data type. So, where's > numeric involved? > Is there a way to force CONTEXT output in the reported error? I guess that could help. I'm also kind of wondering what the intended use case for this > function is. Why do we want it? Do we want it? > As suggested above a usecase could be like the following: SELECT relname FROM pg_class WHERE pg_relation_size(oid) > pg_size_bytes('100 GB'); I think it's neat and useful. -- Alex