From: | Dirk Mika <Dirk(dot)Mika(at)mikatiming(dot)de> |
---|---|
To: | Karsten Hilbert <karsten(dot)hilbert(at)gmx(dot)net>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Set COLLATE on a session level |
Date: | 2020-12-04 06:47:21 |
Message-ID: | CB2536E7-FCBA-41A1-A6BA-30F2313AAF5D@mikatiming.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> > > Or views in schemas per locale. Selecting the search path
> > > per locale pulls in the right view.
> >
> > And one view per locale would mean that I would have to
> > create a whole schema including all views for each locale I
> > want to support. I would have to roll out a new version of
> > the data model, just for an additional locale.
>
> Or a "smart" view. Set a session variable before running the
> query and have the (one) view return the locale'd data based
> on the session variable ...
>
>set session "mika.current_locale" = 'locale(at)2_use';
>
> and use
>
>select current_setting('mika.current_locale')
>
> as needed inside the view definition
I'll take a look at that. Thank you very much for the idea.
>
> > This all seems unnecessarily complicated to me.
>
> No one said it is going to be particularly convenient... You
> asked for possible, I guess. :-)
My sentence was more along the lines that I cannot imagine that I am the first to have this problem and that there should therefore be an easier solution. But apparently the topic is not so relevant in general. 😉
BR
Dirk
--
Dirk Mika
Software Developer
mika:timing GmbH
Strundepark - Kürtener Str. 11b
51465 Bergisch Gladbach
Germany
fon +49 2202 2401-1197
dirk(dot)mika(at)mikatiming(dot)de
www.mikatiming.de
AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884
Geschäftsführer: Harald Mika, Jörg Mika
From | Date | Subject | |
---|---|---|---|
Next Message | charles meng | 2020-12-04 08:12:00 | Re: Alter the column data type of the large data volume table. |
Previous Message | Michael Paquier | 2020-12-04 05:46:38 | Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path |