Re: [HACKERS] [SQL] Interval subtracting

2006-03-08 Thread Markus Schaber
Hi, Scott, Scott Marlowe wrote: >>But it isn't '-2 months, -1 day'. I think what you are saying is what I >>am saying, that we should make the signs consistent. > Pretty much. It just seems wrong to have different signs in what is > essentially a single unit. > > We don't say 42 degrees, -12 m

Re: [HACKERS] [SQL] Interval subtracting

2006-03-08 Thread Scott Marlowe
On Wed, 2006-03-08 at 06:07, Markus Schaber wrote: > Hi, Scott, > > Scott Marlowe wrote: > > >>But it isn't '-2 months, -1 day'. I think what you are saying is what I > >>am saying, that we should make the signs consistent. > > Pretty much. It just seems wrong to have different signs in what is

Re: [HACKERS] [SQL] Interval subtracting

2006-03-08 Thread Tom Lane
Scott Marlowe <[EMAIL PROTECTED]> writes: > For same reasons, i.e. a need for precision, I find it hard to accept > the idea of mixing positive and negative units in the same interval. The semantics are perfectly well defined, so I don't buy this. regards, tom lane -

[SQL] Errors ignored on restore

2006-03-08 Thread Emil Rachovsky
Hi, I'm transfering data between postgre 8.0 and 8.1 using pg_dump and pg_restore, but I get "x errors ignored on restore". What could be the reason ? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.y

Re: [SQL] [GENERAL] Errors ignored on restore

2006-03-08 Thread Tom Lane
Emil Rachovsky <[EMAIL PROTECTED]> writes: > I'm transfering data between postgre 8.0 and 8.1 using > pg_dump and pg_restore, but I get "x errors ignored on > restore". What could be the reason ? If you aren't going to show us what the errors were, how can we guess? rega

Re: [HACKERS] [SQL] Interval subtracting

2006-03-08 Thread PFC
For same reasons, i.e. a need for precision, I find it hard to accept the idea of mixing positive and negative units in the same interval. The plus or minus sign should be outside of the interval. The interval data type is really useful. I see no reason to restrict its usefulness with an ar

[SQL] Is there any way to stop triggers from cycling?

2006-03-08 Thread Josh Berkus
Folks, I'm experimenting with a set of triggers to automagically maintain ltrees-organized tables. I almost have it working, except for a pesky problem with re-ordering groups. The idea is that I want to set up a set of triggers such that: a) If the user moves item (1) to item (3), then the ex

Re: [SQL] Is there any way to stop triggers from cycling?

2006-03-08 Thread Rod Taylor
> I'm experimenting with a set of triggers to automagically maintain > ltrees-organized tables. I almost have it working, except for a pesky > problem with re-ordering groups. > Currently I'm doing this by only cascade-updating the row adjacent to the > one I'm moving. However, this is resul

Re: [SQL] Is there any way to stop triggers from cycling?

2006-03-08 Thread chester c young
trying to do this exlusively in triggers is a forray into folly. take advantage of "instead of" or "do also" rules to create a compound statement before your triggers do their work. (in terms of maintenance and sanity, it's best if a trigger touches only its own record.) as a handsweep example:

Re: [SQL] Is there any way to stop triggers from cycling?

2006-03-08 Thread Josh Berkus
Chester, > take advantage of "instead of" or "do also" rules to create a compound > statement before your triggers do their work. (in terms of maintenance > and sanity, it's best if a trigger touches only its own record.) Ah, I see ... so: 1) create a view on the table 2) put a rule on the view