Re: [GENERAL] join on next row

2006-06-24 Thread Sim Zacks
Merlin, Thank you for your input. My original question did specifically mention that the events had to be on the same day. I need to have a query that gives per employee each event and the event after it if it happened _on the same day_. Secondly, I hadn't seen that syntax in 8.2 yet. That

Re: [GENERAL] casting... adding integer to timestamp

2006-06-24 Thread Frank Finner
On Sat, 24 Jun 2006 23:23:57 -0600 Mark Gibson <[EMAIL PROTECTED]> thought long, then sat down and wrote: > > > If play_length is a timestamp, I can do this: > > SELECT play_length - INTERVAL '13 seconds' ... > > But what if play_seconds is a column? > > SELECT play_length - INTERVAL 'play

Re: [GENERAL] casting... adding integer to timestamp

2006-06-24 Thread Michael Glaesemann
On Jun 25, 2006, at 14:23 , Mark Gibson wrote: SELECT play_length - INTERVAL 'play_seconds seconds' ... The column isn't interpolated into the string. Try SELECT play_length - play_seconds * INTERVAL '1 second' Hope this helps. Michael Glaesemann grzm seespotcode net -

[GENERAL] casting... adding integer to timestamp

2006-06-24 Thread Mark Gibson
If play_length is a timestamp, I can do this: SELECT play_length - INTERVAL '13 seconds' ... But what if play_seconds is a column? SELECT play_length - INTERVAL 'play_seconds seconds' ... This doesn't work. ERROR: invalid input syntax for type interval: "play_seconds seconds" Can anyone

Re: [GENERAL] auto-vacuum & Negative "anl" Values

2006-06-24 Thread Matthew T. O'Connor
Tom Lane wrote: Dylan Hansen <[EMAIL PROTECTED]> writes: I have been spending some time looking into how auto-vacuum is performing on one of our servers. After putting the PostgreSQL logs in debug I noticed that the threshold for ANALYZE was never being hit for a particular table becaus

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-24 Thread Jan Wieck
On 6/18/2006 11:41 PM, Wes wrote: Is there a way to add a foreign key constraint without having to wait for it to check the consistency of all existing records? If a database is being reloaded (pg_dumpall then load), it really shouldn't be necessary to check the referential integrity - or at le

Re: [GENERAL] Form builder?

2006-06-24 Thread Tony Caduto
Lazarus or Delphi can do what you want, but you have to code it yourself, but luckily it's not that difficult becasue of the database stuff is all based on the tdataset framework. I do automatic form generation from a table in PG Lightning Admin and it's not that difficult at all. You simply lo