[ADMIN] bizarre AGE behaviour

2004-03-03 Thread DHS Webmaster
Hello all, Many thanks for this fine product. We began encountering some unexpected date related errors this week and after further investigation found the following. We use the postgres AGE function in a custom function. The AGE function has begun to throw some unanticipated results back. This has

Re: [ADMIN] bizarre AGE behaviour

2004-03-03 Thread Steve Crawford
On Wednesday 03 March 2004 9:19 am, DHS Webmaster wrote: > We began encountering some unexpected date related errors this week... > This is good... > network=# select age('04-01-04','03-01-04'); > age > --- > 1 mon > (1 row) > > This isn't... > network=# select age('05-01-04','03-01-04');

Re: [ADMIN] bizarre AGE behaviour

2004-03-03 Thread Tom Lane
Steve Crawford <[EMAIL PROTECTED]> writes: > US Daylight Saving Time starts this year on April 4 when 0200 jumps to > 0300. The answers PostgreSQL gave are correct. I suspect what the OP wants is non-timezone-aware behavior, which he could get by casting the inputs of age() to timestamp without t

[ADMIN] Multiple inserts without COPY

2004-03-03 Thread Mark Lubratt
Hello! I have a routine in my application where I have the potential to generate hundreds of inserts or deletes at one time. Right now, I issue each insert and delete separately. I'm hoping there might be a way of generating a single SQL statement to send to the backend for each. The delete

Re: [ADMIN] Multiple inserts without COPY

2004-03-03 Thread Tom Lane
Mark Lubratt <[EMAIL PROTECTED]> writes: > The deletes look something like > delete from CL where CL_id = i > where i could be a list of several hundred integers. Again, right now > I iterate through the list. Consider delete from CL where CL_id in (i,j,k,...); If you have hundreds of ta

Re: [ADMIN] Multiple inserts without COPY

2004-03-03 Thread Mark Lubratt
On Mar 3, 2004, at 10:22 PM, Tom Lane wrote: Mark Lubratt <[EMAIL PROTECTED]> writes: The deletes look something like delete from CL where CL_id = i where i could be a list of several hundred integers. Again, right now I iterate through the list. Consider delete from CL where CL_id in (i,j,k,...

Re: [ADMIN] Multiple inserts without COPY

2004-03-03 Thread Tom Lane
Mark Lubratt <[EMAIL PROTECTED]> writes: >> Huh? You can use COPY FROM STDIN in most of our client libraries, >> certainly so with libpq. What are you using? > Actually, I'm using REALbasic. Um. I have no idea what sort of support they have, but you do need a client interface library that know

Re: [ADMIN] Multiple inserts without COPY

2004-03-03 Thread Mark Lubratt
On Mar 3, 2004, at 11:20 PM, Tom Lane wrote: Mark Lubratt <[EMAIL PROTECTED]> writes: Huh? You can use COPY FROM STDIN in most of our client libraries, certainly so with libpq. What are you using? Actually, I'm using REALbasic. Um. I have no idea what sort of support they have, but you do need