Re: Set COLLATE on a session level

2020-12-11 Thread Alexandre GRAIL
On 10/12/2020 19:33, Dirk Mika wrote: There is a SET COLLATION command in the SQL standard that does this. Someone just has to implement it. It wouldn't be terribly difficult, I think. I think it would be analogous to the schema search path. Usually you notice right away if the "search_path"

Re: Casting Integer to Boolean in assignment

2019-01-24 Thread Alexandre GRAIL
;t' or 'f', if you consider all the computer history... In the end it would be very nice to add a pointer in the documentation about this behavior and a quick workaround for the ones who really need it. That would be great :D ! Thanks all ! -- Alexandre GRAIL /Ingénieur Lo

Re: Casting Integer to Boolean in assignment

2019-01-24 Thread Alexandre GRAIL
On 24/01/2019 12:45, Geoff Winkless wrote: My own opinion is that non-0 should implicitly cast as true and 0 should cast as false. I just run UPDATE pg_cast SET castcontext = 'i' WHERE oid IN ( SELECT c.oid FROM pg_cast c inner join pg_type src ON src.oid = c.castsource inner join pg_typ

Casting Integer to Boolean in assignment

2019-01-24 Thread Alexandre GRAIL
Hello the list, Maybe this question has been debated before (I didn't find anything helpful) but : Why the default is to throw an error when casting Integer to Boolean in assignment, and accepting it everywhere else ? So you can type : postgres=# select 1::boolean;  bool --  t (1 row)