|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: What defines the output format of a Postgres Timestampby haukex (Archbishop) |
| on Jan 26, 2021 at 10:14 UTC ( [id://11127466]=note: print w/replies, xml ) | Need Help?? |
|
Now I'm wondering where the output format is defined. A quick look at the documentation: sections 8.5.2. Date/Time Output and 19.11.2. Locale and Formatting appear to discuss this. I would have to change each and every select statement to have a TO_CHAR with the proper format. This StackOverflow answer suggests defining a function to curry the arguments. In another piece of code I have lying around that uses Mojo::Pg, I use DateTime::Format::Strptime to parse the date strings coming from Postgres and DateTime's strftime to format them, though I suspect that's going to be less efficient than letting the database handle it.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||