On Feb 24, 2024, at 19:11, Jim Jones <jim.jo...@uni-muenster.de> wrote:

>> What’s the protocol for marking a patch ready for committer?
> 
> I guess after the review of the last assigned reviewer

Oh, I didn’t realize someone was assigned. :-)

> The fact that a completely invalid type returns NULL ..
> 
> SELECT to_regtypemod('foo');
>  to_regtypemod
> ---------------
>               
> (1 row)
> 
> 
> .. but a "partially" valid one returns an error might be confusing
> 
> postgres=# SELECT to_regtypemod('timestamp(-4)');
> ERROR:  syntax error at or near "-"
> LINE 1: SELECT to_regtypemod('timestamp(-4)');
>                   ^
> CONTEXT:  invalid type name "timestamp(-4)"
> 
> postgres=# SELECT to_regtypemod('text(-4)');
> ERROR:  type modifier is not allowed for type "text"

Yeah, there was quite a bit of discussion of this issue back in September[1].

> This behaviour is mentioned in the documentation, so I'd say it is ok.

This is my attempt to make it clearer that it can return an error, but I don’t 
love the wording TBH.

> I would personally prefer either NULL or an error in both cases, but I
> can totally live with the current design.

SAME.

Best,

David

[1] 
https://www.postgresql.org/message-id/flat/09f9cad6-5096-43cc-b6a7-685703e47...@justatheory.com



Reply via email to