[GENERAL] do i need a view or procedure?

2001-07-16 Thread Fran Fabrizio
Hello, I am trying to get my head around a complex problem I've been tasked with... We have a set of servers spread throughout the country (100s to 1000s of them) and I need to build a patch-distributing postgresql database. The actual patches would be distributed via rpm's which we'd like to

Re: [GENERAL] do i need a view or procedure?

2001-07-17 Thread Fran Fabrizio
Matt, Thank you for the feedback! > I, too, am not a guru. Indeed, I'm so far from guru-hood that I'm not > even clear on why it is that you need anything more complicated than a > SELECT. Well, this may be exactly what we need, since a view is basically just a SELECT statement. It's just get

[GENERAL] replication?

2001-07-18 Thread Fran Fabrizio
Does postgres support replication? I think this is the feature I need. I have a table in one db that I need to use from another db on another machine. The first db is behind two firewalls (for a good reason =) and the second needs to be hung out on the internet, so I can't really use the same d

[GENERAL] Error Codes?

2001-10-10 Thread Fran Fabrizio
I'm a bit confused about the current state of error codes in Pg. The docs and the mailing list archives seem to indicate that this is a TODO item, however, at least when using Perl with DBD::Pg, when I call $db->err() or examine $DBI::err I get a number back. For instance, 7 if I try to insert

Re: [GENERAL] Error Codes?

2001-10-10 Thread Fran Fabrizio
> Rob Arnold wrote: > > > Look at $db->errstr That has the text version of the error code. > > > > --rob Yes, but I want to know about the codes, not the text. If the codes exist, they are easier to work with than the text. -Fran ---(end of broadcast)-

[GENERAL] installing DBD::Pg without installing postgres

2001-04-23 Thread Fran Fabrizio
Hello, It seems that there should be a way to install the DBD Pg module without having to install postgres on the local machine. I tried installing just the libs rpm, but that didn't seem to do the trick. I've done some usenet and mailing list archive searches, but all the info I'm turning up

Re: [GENERAL] installing DBD::Pg without installing postgres

2001-04-23 Thread Fran Fabrizio
> What's the dependencies for the DBD::Pg RPM? Satisfy those > dependencies, and properly set up for client-server communications with > a postgresql server, and it _should_ just _work_. Well, if I had known what it took to satisfy the dependencies, I wouldn't have needed to post here. ;-)

Re: [GENERAL] installing DBD::Pg without installing postgres

2001-04-24 Thread Fran Fabrizio
Michelle & John> Yes, that's exactly what I am trying to accomplish. I am setting up a network monitoring application for our support personnel, and I have multiple people all examining data that gets reported to a central database. So I didn't relish the idea of installing postgres on all of

[GENERAL] DBI/AutoCommit/Postgres

2001-04-30 Thread Fran Fabrizio
Hello all, I'm trying to speed up some insert statements. I have been tinkering with the postmaster and DBI parameters I did some timings on my insert and copy commands. Here is a sample insert query: 010430.18:31:18.199 [2604] query: insert into log values (0,0,lower('blah.blah.mydomain.com

[GENERAL] Re: Stranger than fiction - EXPLAIN results

2001-05-02 Thread Fran Fabrizio
I'm sorry that I did not send the EXPLAIN results along with my original email, I had no idea this command existed (I'm a first-week rookie with postgres!) Also, I did not know about vacuum, and apparently, that was the culprit! After vacuum'ing, times went from .433 sec/query to .001. Holy mol

Re: [GENERAL] select off of a view going slowly

2001-05-07 Thread Fran Fabrizio
Hello all, I've finished upgrading to 7.1 and I'm still having trouble getting this view to run respectably. Does a view run its query every time I select from the view? I had been assuming that the view recreates itself when I modify the table to which the view is attached, but Tom mentioned t

[GENERAL] Trigger only firing once

2001-05-10 Thread Fran Fabrizio
What would cause this trigger: create trigger log_trigger before insert on log for each row execute procedure update_host_table(); to only fire on the first insert per connection, but none of the subsequent inserts? The trigger runs fine, the procedure it calls runs fine, but it only executes

[GENERAL] formatting a date

2001-05-10 Thread Fran Fabrizio
I'm looking all over the place in the Pg docs and Momjian book and having no luck finding any functions that would turn a timestamp such as 2001-05-08 23:59:59-04 into May 8, 2001. (i.e. do what date_format() was doing for me in MySQL.) Is there equivalent functionality in Pg? Thanks, Fran

[GENERAL] Trigger only firing once

2001-05-11 Thread Fran Fabrizio
Anyone have any clues as to my question yesterday re: why my trigger only fires on the first insert per connection? After posting yesterday, I tried a few different things, but the only thing that works (and obviously not the most efficient thing to do) is to disconnect and reconnect after every

Re: [GENERAL] Trigger only firing once

2001-05-14 Thread Fran Fabrizio
> Kinda hard to believe. I know it, but that's what I am seeing. (to recap, my trigger only fires on the first insert per connection.) This will be kind of long, it's a spliced-together version of my psql client session and the server log. I drop and re-create the procedure and trigger, the

[GENERAL] Calling external programs

2001-06-05 Thread Fran Fabrizio
Hello, I would like to call an external program from Pg. Specifically, I'd like to send an email every time a row with certain attribute values is inserted into a table. I already have a trigger that fires upon insertion into the table. Is the preferred method to have a trigger call a procedu

Re: [GENERAL] "trigger"ing a procedure every X minutes

2001-06-06 Thread Fran Fabrizio
7;d like to try it someday, when I know a lot more about Pg. My current project has an ever-growing number of cron jobs (up to 6 now) and was just thinking about various ways to tidy it up. Thanks for the info, Fran > Fran Fabrizio <[EMAIL PROTECTED]> writes: > > Is the preferred

[GENERAL] designating a column as primary key after creation

1998-08-12 Thread Fran Fabrizio
Why does postgres choke on the following: alter table mytable add constraint mycolumn_pk primary key(mycolumn); is this possible in a postgres database? if not, what's an easy workaround, i really need to have this column as primary key. Thanks! -Fran

[GENERAL] getting the currval of a sequence

1998-08-14 Thread Fran Fabrizio
Hi all, I need to do the equivalent of: select my_sequence.CURRVAL from Sys.dual; so I'm guessing its: select currvar('my_sequence') from ???; Can anyone fill in the Thanks! -Fran