Re: Best conception of a table

2018-05-11 Thread Laurenz Albe
hmidi slim wrote: > To clarify the purpose of the table 'product_price_period': If I have a > product > and I choose period like [2018-05-01, 2018-05-31] and in the days_checked = > [0,2,3]. > The values of days_checked are the indexes of the week's day. > In this case 0 => sunday, 2 => tuesday,

Best conception of a table

2018-05-11 Thread hmidi slim
Hi, I want to get some different opinions and tips about two different conception. I want to create a table named proudct_price_period create table product_price_period { id integer , product_id integer, occupation_type_id integer, price_mode_id integer, price_period daterange, days_checked integer

Re: Why is my Postgre server went in recovery mode all in sudden

2018-05-11 Thread Adrian Klaver
On 05/11/2018 03:30 AM, nikhil raj wrote: Hi Adrian Klaver, No its like it opens  connection and once the query gets execute it goes to idle connection and again idle connection time out i kept it for 2 mins . It never happen again. need few answers why will share buffer crashes ? From the

Re: Why is my Postgre server went in recovery mode all in sudden

2018-05-11 Thread nikhil raj
Hi Adrian Klaver, No its like it opens connection and once the query gets execute it goes to idle connection and again idle connection time out i kept it for 2 mins . It never happen again. need few answers why will share buffer crashes ? Thanks, On Thu, May 10, 2018 at 7:28 PM, Adrian Klav

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-11 Thread Ben Hood
> On 10 May 2018, at 23:43, Adrian Klaver wrote: > > Trying to tame time and time zones is maybe quixotic, but not weird. Quixotic is a very good description, I’d happily admit that using the UTC domain in this way is not as pragmatic as I thought it would when I introduced it. > While I was

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-11 Thread Ben Hood
> On 10 May 2018, at 22:17, Peter J. Holzer wrote: > > I don't understand how this can work. As Francisco demonstrated, > EXTRACT(TIMEZONE FROM ts) doesn't extract the time zone from the value > ts, it reports the offset of the client's time zone. Yes, you and Francisco are right. If you do: