[SQL] Applying SUM twice in the same query.

2000-07-14 Thread Rodger Donaldson
I have a table structured: server_name|server_version |number ---++-- Apache |1.3.11 | 1 Netscape-Enterprise|2.01| 1 Apache |1.1.3 | 2 Initially I wanted to extract the total count by

Re: [SQL] transactions within stored procedures

2000-07-14 Thread Thomas Mack
> >By trial and error I established that a SP wraps everything it does in >one transaction, including anything from stored procedures it calls. > >So here is my question: Is there any way for me to control when >transactions are committed or rolled back within stored procedures? Is When you inv

[SQL] transactions within stored procedures

2000-07-14 Thread Nathan Young
Hi. Please correct me if this is off topic for the group. On looking through the available postgres mailing lists, this seemed the most appropriate for my question. Transactions are important to my application. I was scripting in perl with autocommit turned off, issuing commits when appropriat

Re: [SQL] Trigger

2000-07-14 Thread Tom Lane
Carolyn Lu Wong <[EMAIL PROTECTED]> writes: > In the "Interaction with the Trigger Manager" from the online document, > it states that it's for V7.1 or later. Because I'm working on earlier > version, do I need to modify my code if the database is upgraded to > later versions? The trigger interfa

Re: [SQL] nevermind...

2000-07-14 Thread Tom Lane
John BEPPU <[EMAIL PROTECTED]> writes: > Nevermind my last post. I'm still confused, but for > different reasons. I'm on my friends box, and I have > screen running. In one tty, creating tables with the > serial type works, but in the other tty, it fails. Same comment as I was about to make fo

[SQL] Trigger

2000-07-14 Thread Carolyn Lu Wong
I'm using V6.5.3. I'm trying to create transaction logs for particular table, so I need to write trigger on insert/delete/update on each row. Are there any examples/documents that can help me with this? In the "Interaction with the Trigger Manager" from the online document, it states that it's f

[SQL] nevermind...

2000-07-14 Thread John BEPPU
Nevermind my last post. I'm still confused, but for different reasons. I'm on my friends box, and I have screen running. In one tty, creating tables with the serial type works, but in the other tty, it fails. Both shells are on the same box, so it must be some kind of environment issue (or that

[SQL] case-sensitivity and the serial type

2000-07-14 Thread John BEPPU
I've been using the debian package of postgresql (7.0-release-1) and I've been able to say something like: create table blah ( id serial ); Note how serial is all lowercase. I have since compiled postgresql 7.0.2 on my friends box and installed it in my home directory so I could play w/ it.