Re: [SQL] DELETE...RETURNING problem with libpq

2013-05-25 Thread Wolfe Whalen
helps or if we should dig into it a little deeper. Best regards, Wolfe -- Wolfe Whalen wo...@quios.net On Sat, May 25, 2013, at 04:07 AM, Brice André wrote: Dear all, I am trying to translate a code written in php to C++. So, I am now using lipq in order to access my postgresql database fr

Re: [SQL] Postgres trigger issue with update statement in it.

2013-04-04 Thread Wolfe Whalen
in this child table, so let's update it there. ->Child: Update row 1 -> Trigger function -> Update Row 1 on parent ->Parent: Let's see... Row 1 is contained in this child table, so let's update it there. ... etc etc. Best Regards, Wolfe -- Wolfe Whalen wo...

Re: [SQL] unique keys / foreign keys on two tables

2012-11-29 Thread Wolfe Whalen
you 8 possibilities and so on. It's a pretty neat way to "encode" other information into one field. I hope that helps! Best, Wolfe -- Wolfe Whalen wo...@quios.net On Thu, Nov 29, 2012, at 02:14 AM, Gary Stainburn wrote: > I'm designing the schema to store a confi

Re: [SQL] generate_series() with TSTZRANGE

2012-09-13 Thread Wolfe Whalen
That's much better, thank you! -- Wolfe Whalen wo...@quios.net On Thu, Sep 13, 2012, at 06:52 AM, Sergey Konoplev wrote: > On Thu, Sep 13, 2012 at 3:53 AM, Wolfe Whalen > wrote: > > SELECT tstzrange((lag(a) OVER()), a, '[)') > > FROM generate_series('

[SQL] generate_series() with TSTZRANGE

2012-09-12 Thread Wolfe Whalen
g and experimentation: INSERT INTO room_reservations SELECT 'F104', 'John', 'Another Talk', tstzrange((lag(a) OVER()), a, '[)') FROM generate_series('2012-09-16 12:00:00'::timestamp, '2012-09-17 12:00:00', '1 hour') AS a O