On 2021-10-22 10:26:38 -0700, Bryn Llewellyn wrote:
> There could, so easily, have been three “to_char()” overloads for these three
> data types that honored the spirit of the “::text” typecast by rendering only
> what’s meaningful, despite what the template asks for.
I think to_date() is very muc
> t...@sss.pgh.pa.us wrote:
>
> Bryn Llewellyn writes:
>> There could, so easily, have been three “to_char()” overloads for these
>> three data types that honored the spirit of the “::text” typecast by
>> rendering only what’s meaningful, despite what the template asks for.
>
> You can, of cours
> david.g.johns...@gmail.com wrote:
>
>> Bryn wrote:
>>
>> There could, so easily, have been three “to_char()” overloads for these
>> three data types…
>
> The argument about avoiding the implicit cast, and thus being easier for
> newcomers to figure out, is the compelling one for me. But, fra
On Friday, October 22, 2021, Bryn Llewellyn wrote:
>
> There could, so easily, have been three “to_char()” overloads for these
> three data types that honored the spirit of the “::text” typecast by
> rendering only what’s meaningful, despite what the template asks for.
>
Even if we added to_char(
You can, of course, trivially make that so in your own database.
=# create function to_char(date, text) returns text
language sql stable strict parallel safe
as 'select pg_catalog.to_char($1::timestamp without time zone, $2)';
=# select to_char(current_date, 'dd-Mon- TZH:TZM');
to_c
On 10/22/21 10:26 AM, Bryn Llewellyn wrote:
//
I’ll make this my final turn on this thread. Yes, I accept that
everything to do with the date-time story is tough stuff. And I do
understand that this is, to a large extent, just a reflection of the
fact that the terrain is inevitably affected
Bryn Llewellyn writes:
> There could, so easily, have been three “to_char()” overloads for these
> three data types that honored the spirit of the “::text” typecast by
> rendering only what’s meaningful, despite what the template asks for.
You can, of course, trivially make that so in your own da
> adrian.kla...@aklaver.com wrote:
>
> Bryn wrote:
>
>>> adrian.kla...@aklaver.com wrote:
>>>
>>> Bryn wrote:
> Adrian Klaver wrote:
> ...
>> You've lost me entirely here, I'm afraid.
>> My question was simple: why is there no "to_char ( date, text ) → text"
>> overload?
>
> Because th
On 10/21/21 17:42, Bryn Llewellyn wrote:
On 21-Oct-2021, at 17:15, Adrian Klaver wrote:
On 10/21/21 15:45, Bryn Llewellyn wrote:
/Adrian Klaver wrote:/
*Why is there no "date" overload of "to_char()"?*
You've lost me entirely here, I'm afraid.
My question was simple: why is there no "to
> On 21-Oct-2021, at 17:15, Adrian Klaver wrote:
>
> On 10/21/21 15:45, Bryn Llewellyn wrote:
>>> /Adrian Klaver wrote:/
>>>
/Bryn wrote:/
>
>> Thanks, too, to David Johnston for your reply. Yes, I see now that the
>> "10.1. Overview" page that starts the "Type Conversion" chapter d
On 10/21/21 15:45, Bryn Llewellyn wrote:
/Adrian Klaver wrote:/
/Bryn wrote:/
Thanks, too, to David Johnston for your reply. Yes, I see now that the
"10.1. Overview" page that starts the "Type Conversion" chapter does
have lots of inflexions of the verb "prefer". And close to one of these
> Adrian Klaver wrote:
>
>> Bryn wrote:
>>
>> I fear that I'm about to embarrass myself again. So I'll just ask for
>> forgiveness in advance. Here's a simple test to get started. (All tests are
>> done in a session where I set the timezone to 'UTC'.)
>>
>> drop function if exists f(text)
On 10/21/21 12:52, Bryn Llewellyn wrote:
I fear that I'm about to embarrass myself again. So I'll just ask for
forgiveness in advance.
Here's a simple test to get started. (All tests are done in a session
where I set the timezone to 'UTC'.)
*drop function if exists f(text) cascade;
**
On Thursday, October 21, 2021, Bryn Llewellyn wrote:
>
> This causes the 42883 error, "function f(date) does not exist". I might've
> expected the system to have done an implicit conversion to "text" because
> this conversion is supported, thus:
>
Yes, implicit casting to text is bad.
>
> For
I fear that I'm about to embarrass myself again. So I'll just ask for
forgiveness in advance.
Here's a simple test to get started. (All tests are done in a session where I
set the timezone to 'UTC'.)
drop function if exists f(text)cascade;
drop function if exists f(timestamp) cascade;
15 matches
Mail list logo