这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@hlinnaka
Copy link
Contributor

Before this commit, the error was reported with ERRCODE_INTERNAL_ERROR (SQLSTATE XX000):

postgres=# \set VERBOSITY verbose
postgres=# select 'foo'::ulid;
ERROR:  XX000: invalid input syntax for type ulid: "foo": invalid length
LINE 1: select 'foo'::ulid;
               ^
LOCATION:  lib.rs:37

With this, ERRCODE_INVALID_TEXT_REPRESENTATION (SQLSTATE 22P02) is used:

postgres=# \set VERBOSITY verbose
postgres=# select 'foo'::ulid;
ERROR:  22P02: invalid input syntax for type ulid: "foo": invalid length
LINE 1: select 'foo'::ulid;
               ^
LOCATION:  <ulid::ulid as pgrx::inoutfuncs::InOutFuncs>::input, lib.rs:39

Before this commit, the error was reported with ERRCODE_INTERNAL_ERROR
(SQLSTATE XX000):

```
postgres=# \set VERBOSITY verbose
postgres=# select 'foo'::ulid;
ERROR:  XX000: invalid input syntax for type ulid: "foo": invalid length
LINE 1: select 'foo'::ulid;
               ^
LOCATION:  lib.rs:37
```

With this, ERRCODE_INVALID_TEXT_REPRESENTATION (SQLSTATE 22P02) is used:

```
postgres=# \set VERBOSITY verbose
postgres=# select 'foo'::ulid;
ERROR:  22P02: invalid input syntax for type ulid: "foo": invalid length
LINE 1: select 'foo'::ulid;
               ^
LOCATION:  <ulid::ulid as pgrx::inoutfuncs::InOutFuncs>::input, lib.rs:39
```
@pksunkara pksunkara merged commit d05494e into pksunkara:master Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants