hard-coding configuration values is seldom the best choice for all 
situations.
None of these are required, neither nspostgres nor nsdbpg set these values,
bot driver work between naviserver and postgres in a large number of 
installations.
If one configures the database with a timezone = 'Europe/Vienna', and 
connects
to the database without having specified anything, this person will expect
to have the configured  timezone respected.

I actually don't care much about client_encoding and datestyle (iso is 
the default, anyhow),
but "timezone" is evil, unless one lives in UTC. It took me some time to 
figure
out, why some queries with time ranges work well nsdbpg and nsora,
but they did not work with dbipg. For a while i suspected problems with
prepared statements and timestamps until i found the hard-coded session 
timezone.

Since you seem to require the session-time-zone, and since it hurts us,
i'll make this configurable when i have the chance.

All the best
-gn

PS: These parameters have nothing to do with the per-page customization.
You do not want alter what "1h ago" means, which is just between nsd and 
postgres,
and not between browser and nsd.

Am 09.02.14 20:47, schrieb Stephen:
> On Sun, Feb 9, 2014 at 1:56 AM, Gustaf Neumann <neum...@wu.ac.at> wrote:
>> dbipg does for each session unconditionally
>>
>> set session timezone = 'UTC'
>> set session client_encoding = 'UTF8'
>> set session datestyle = 'ISO'
>>
>> actually, postgresql.conf sets these values, it is confusing, when psql
>> behaves
>> differently from a naviserver session. Are there concerns to remove
>> these settings
>> from the driver?
> Yes.
>
> 'UTF8' is required so that we can feed the tcl core strings in the
> format it expects.
>
> The time stuff is so that no matter which driver you are using, or
> which particular db, or from which machine with whatever environment
> (developer laptop, staging, production), times and dates pop out in a
> predictable format you can feed to clock -format or some templating
> system.
>
> In the end, you often want to customise the format per page or user anyway.


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to