Re: Does Type Have = Operator?
От | David E. Wheeler |
---|---|
Тема | Re: Does Type Have = Operator? |
Дата | |
Msg-id | A97E493F-87D2-47D1-84D7-2A1BDAAB012A@justatheory.com обсуждение исходный текст |
Ответ на | Re: Does Type Have = Operator? (Jim Nasby <Jim.Nasby@BlueTreble.com>) |
Список | pgsql-hackers |
Sorry for the pgTAP off-topicness here, hackers. Please feel free to ignore. On May 17, 2016, at 8:10 AM, Jim Nasby <Jim.Nasby@BlueTreble.com> wrote: > Speaking specifically to is(), what I'd find most useful is if it at least hinted that there might be some type shenanigansgoing on, because I've run across something like your example more than once and it always takes a lot to finallyfigure out WTF is going on. Agreed. Same for the relation testing functions. Maybe some additional diagnostics could be added in the event of failure. > I think it'd also be useful to be able to specify an equality operator to is(), though that means not using IS DISTINCT. You can use cmp_ok(). http://pgxn.org/dist/pgtap/doc/pgtap.html#cmp_ok. > Something else to keep in mind here is that is() is defined as is(anyelement, anyelement, text), which means you've lostyour original type information when you use it. I don't think you could actually do anything useful here because of that. pg_typeof() will give it to you. Best, David
В списке pgsql-hackers по дате отправления: