Re: [GENERAL] Gborg down?

2004-11-06 Thread Gaetano Mendola
Marc G. Fournier wrote: On Fri, 5 Nov 2004, Joshua D. Drake wrote: I've posted details to the FreeBSD -stable and -current mailing list, but the simple summary is that 'ifconfig dev -alias' with no ip specific'd literally erases all IPs on that device, leaving the server running

Re: [GENERAL] create a text file from postgres (like Oracle UTL_FILE package)

2004-11-06 Thread Leo Martin Orfei
ok. I gonna explain a little more my situation. I have a postgres server (Linux) and clients (Win2k+delphi application). I need create a text file with some columns from a table in the server machine, but this file must be created only when the user wants. (click button on my delphi program on

Re: [GENERAL] create a text file from postgres (like Oracle

2004-11-06 Thread Tino Wildenhain
Hi, Am Sa, den 06.11.2004 schrieb Leo Martin Orfei um 13:52: ok. I gonna explain a little more my situation. I have a postgres server (Linux) and clients (Win2k+delphi application). I need create a text file with some columns from a table in the server machine, but this file must be

Re: [GENERAL] Gborg down?

2004-11-06 Thread Marc G. Fournier
On Sat, 6 Nov 2004, Gaetano Mendola wrote: Marc G. Fournier wrote: On Fri, 5 Nov 2004, Joshua D. Drake wrote: I've posted details to the FreeBSD -stable and -current mailing list, but the simple summary is that 'ifconfig dev -alias' with no ip specific'd literally erases all IPs on that device,

Re: [GENERAL] Retrieve ip client from postgres

2004-11-06 Thread Mario A. Soto Cordones
OK thank you On Fri, Nov 05, 2004 at 04:21:52PM -0400, Mario A. Soto Cordones wrote: How can i get the Client Host name/IP Address for the current connection(session). Is there any function or system table(view) which will these details. In 8.0 you'll be able to use inet_client_addr(). I

Re: [GENERAL] Gborg down?

2004-11-06 Thread Alvaro Herrera Munoz
On Sat, Nov 06, 2004 at 11:09:07AM -0400, Marc G. Fournier wrote: On Sat, 6 Nov 2004, Gaetano Mendola wrote: I used to have a script on my remote server that I was running in BG before to touch the network, that script was bringing up the network if was down for more then 2 minutes. My

[GENERAL] Can this be indexed?

2004-11-06 Thread Net Virtual Mailing Lists
Is there a way to create an index that would make this query be efficient and not perform a sequential scan? SELECT count(*) AS count,id FROM sometable GROUP BY id; .. I've considered creating a rule on this table which would put the results of this into another table anytime it is updated, but

Re: [GENERAL] Can this be indexed?

2004-11-06 Thread Ed L.
On Saturday November 6 2004 7:34, Net Virtual Mailing Lists wrote: Is there a way to create an index that would make this query be efficient and not perform a sequential scan? SELECT count(*) AS count,id FROM sometable GROUP BY id; .. I've considered creating a rule on this table which would

[GENERAL] superuser equality

2004-11-06 Thread Ed L.
I'd like to have a DB client connect using a username ('psuedodba') different from the creator/owner ('dba') of the DB and its tables, but still have that username be able to do everything the creator/owner can do (alter tables, drop databases, etc). It appears that createuser -d -a

Re: [GENERAL] Can this be indexed?

2004-11-06 Thread Net Virtual Mailing Lists
I am not clear how to use a trigger for this, I will need to look into that It is my understanding that Postgres does not have materialized views though (which I believe would solve this problem nicely) - am I mistaken?... - Greg Net Virtual Mailing Lists wrote: Is there a way to

[GENERAL] Temporarily disable rule, is this possible?

2004-11-06 Thread Net Virtual Mailing Lists
Hello, I have a table with a rule that goes something like this: CREATE OR REPLACE RULE sometable_delete ON DELETE DO delete FROM cache WHERE tablename='sometable'; CREATE OR REPLACE RULE sometable_insert ON INSERT DO delete FROM cache WHERE tablename='sometable'; CREATE OR REPLACE RULE

Re: [GENERAL] superuser equality

2004-11-06 Thread Peter Eisentraut
Ed L. wrote: createuser -d -a psuedodba works for this purpose. Are there circumstances where 'psuedodba' lacks powers that 'dba' has to create/destroy/alter/update/insert/delete? Or are they truly equivalent in powers? You have created a superuser, who can do anything. This may be

[GENERAL] Postresql RFD version 2.0 Help Wanted.

2004-11-06 Thread Mike Cox
Since we have the discussion going, someone mentioned that the group name should be comp.databases.postgresql. I think this is a good name and I'd like to see what everyone thinks of it. There is also the issue of the charter. I would like to get some feed back on what the best charter could be

[GENERAL] Report Generation

2004-11-06 Thread Randy Yates
At the risk of asking an ill-formed oft-asked question that's probably in the FAQ, is there any report generation tools that are particularly suited for use with postgres databases? -- % Randy Yates % My Shangri-la has gone away, fading like %% Fuquay-Varina, NC%

[GENERAL] Mass Import/Generate PKs

2004-11-06 Thread Hunter Hillegas
I have a CSV file with 400,000 lines of email mailing list information that I need to migrate to a new PostgreSQL database. Each line has all the info I need except a PK (I usually use an int4 column for a PK). If the file were smaller I would probably just use Excel to pop in a PK and then just

Re: [GENERAL] Report Generation

2004-11-06 Thread Ed L.
On Saturday November 6 2004 12:04, Randy Yates wrote: At the risk of asking an ill-formed oft-asked question that's probably in the FAQ, is there any report generation tools that are particularly suited for use with postgres databases? Not sure if you're looking for open source products or

[GENERAL] Trying to get postgres to use an index

2004-11-06 Thread Mike Wertheim
Hi, I'm using PostgreSQL 8. I have two tables that I am doing a join on, and the join executes very slowly. The table called Notification has a text field called NotificationID, which is its primary key. The Notification table also has an int4 field called ItemID, and it has an index on the

Re: [GENERAL] Mass Import/Generate PKs

2004-11-06 Thread Peter Eisentraut
Hunter Hillegas wrote: I have a CSV file with 400,000 lines of email mailing list information that I need to migrate to a new PostgreSQL database. Each line has all the info I need except a PK (I usually use an int4 column for a PK). You could import the file into PostgreSQL and add a

Re: [GENERAL] Trying to get postgres to use an index

2004-11-06 Thread Troels Arvin
On Sat, 06 Nov 2004 12:00:02 -0800, Mike Wertheim wrote: Does anyone have any suggestions on how to make this query run faster? Does it help if you decrease the value of random_page_cost? - That value can be changed run-time, from within psql. If you find that a certain, lower value helps, you

Re: [GENERAL] Postresql RFD version 2.0 Help Wanted.

2004-11-06 Thread Mike Cox
Woodchuck Bill wrote: Mike Cox [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED] berlin.de: Since we have the discussion going, someone mentioned that the group name should be comp.databases.postgresql. I think this is a good name and I'd like to see what everyone thinks of it. Much

Re: [GENERAL] Mass Import/Generate PKs

2004-11-06 Thread Hunter Hillegas
That sounds nice and easy... So, I would do something like 'ALTER TABLE' to generate the PK column? What would be the best way to populate it? Is there an area of doco I should be looking at? Thanks, Hunter From: Peter Eisentraut [EMAIL PROTECTED] Date: Sat, 6 Nov 2004 21:21:25 +0100 To:

Re: [GENERAL] Trying to get postgres to use an index

2004-11-06 Thread Pierre-Frdric Caillaud
explain select notificationID from NOTIFICATION n, ITEM i where n.itemID = i.itemID; QUERY PLAN -- Hash Join (cost=47162.85..76291.32 rows=223672 width=44) Hash Cond: (outer.itemid

Re: [GENERAL] Mass Import/Generate PKs

2004-11-06 Thread Franco Bruno Borghesi
the simplest way to do it seems to be adding a SERIAL column to your table, and then adding a primary key constraint: 1)insert data into table 2)ALTER TABLE table ADD id SERIAL; 3)ALTER TABLE table ADD CONSTRAINT table_pk PRIMARY KEY (id); you can check the docs for the SERIAL type:

Re: [GENERAL] Mass Import/Generate PKs

2004-11-06 Thread Ed L.
On Saturday November 6 2004 2:13, Franco Bruno Borghesi wrote: the simplest way to do it seems to be adding a SERIAL column to your table, and then adding a primary key constraint: 1)insert data into table 2)ALTER TABLE table ADD id SERIAL; 3)ALTER TABLE table ADD CONSTRAINT table_pk PRIMARY

Re: [GENERAL] Mass Import/Generate PKs

2004-11-06 Thread Franco Bruno Borghesi
I've tested it, and the SERIAL type populates the column when you add it On Sat, 2004-11-06 at 18:56, Ed L. wrote: On Saturday November 6 2004 2:13, Franco Bruno Borghesi wrote: the simplest way to do it seems to be adding a SERIAL column to your table, and then adding a primary key

Re: [GENERAL] Trying to get postgres to use an index

2004-11-06 Thread Joel Stevenson
At 10:11 PM +0100 11/6/04, Pierre-Frédéric Caillaud wrote: explain select notificationID from NOTIFICATION n, ITEM i where n.itemID = i.itemID; QUERY PLAN -- Hash Join

Re: [GENERAL] Trying to get postgres to use an index

2004-11-06 Thread mike.wertheim
I'm not a SQL guru by any stretch but would a constrained sub-select be appropriate here? Well, you're joining the entire two tables, so yes, the seq scan might be faster. My mistake! When composing the email to state the problem, I accidentally gave a wrong version of the join query.

[GENERAL] SQL question

2004-11-06 Thread Uwe C. Schroeder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here's a question for the SQL guru's out there, which I've been trying to solve for the last couple of hours. There's got to be a solution to this, but somehow I can't find it. Tables: table1 ( uid int PK, uname varchar(64) )

Re: [GENERAL] Trying to get postgres to use an index

2004-11-06 Thread Tom Lane
[EMAIL PROTECTED] writes: Here is the corrected version, which still has the sequential scan... explain select notificationID from NOTIFICATION n, ITEM i where n.itemID = i.itemID and i.projectID = 12; QUERY PLAN

[GENERAL] Sorting based on maximum value over several columns

2004-11-06 Thread Net Virtual Mailing Lists
Hello, Lets say I have data like this: value1|value2|value3|value4||value(N) --|--|--|--|| 100 | 200 | 300 | 400 || 10| 20 | | 40 || | 15 | | 16 || 5 | | | || Now I want to sort these based on

Re: [GENERAL] SQL question

2004-11-06 Thread Uwe C. Schroeder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If someone knows this it would be great - because I'm still curious how to solve it. However I just remodelled my db structure to eliminate the problem (basically I pulled the several tables into one since each of the table2/table3 tables only has

Re: [GENERAL] Postresql RFD version 2.0 Help Wanted.

2004-11-06 Thread Mike Cox
Devin L. Ganger wrote: On Sat, 06 Nov 2004 11:11:09 -0800, Mike Cox [EMAIL PROTECTED] wrote: Since we have the discussion going, someone mentioned that the group name should be comp.databases.postgresql. I think this is a good name and I'd like to see what everyone thinks of it. I

Re: [GENERAL] Postresql RFD version 2.0 Help Wanted.

2004-11-06 Thread Mike Cox
Polarhound wrote: Mike Cox wrote: There is resistance in the mailing lists however, even though the groups are already on usenet and are in the managed big 8 name space without RFD and CFV. This now brings up the question of traffic numbers. Historically, if people are against a NG,

Re: [GENERAL] Postresql RFD version 2.0 Help Wanted.

2004-11-06 Thread Mike Cox
Woodchuck Bill wrote: Mike Cox [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: I cannot handle the volume of email that a mailing list would place on my inbox. Ever heard of a digest version? I don't care. Its too much of a hassle to dig through without being able to google

Re: [GENERAL] Postresql RFD version 2.0 Help Wanted.

2004-11-06 Thread Mike Cox
Devin L. Ganger wrote: On Sat, 06 Nov 2004 18:03:57 -0800, Mike Cox [EMAIL PROTECTED] wrote: Devin L. Ganger wrote: I think you're pursuing this backwards, Mike. You should contact the current owner of the present mail-to-news gateway and build some sort of consensus with *him* on

Re: [GENERAL] Postresql RFD version 2.0 Help Wanted.

2004-11-06 Thread Marc G. Fournier
On Sat, 6 Nov 2004, Mike Cox wrote: 1. I tried subscribing to comp.databases.postgresql.general through my usenet provider thinking it was a regular big 8 group. When it wasn't found, I sent a request to my news provider to include it. Most modern news readers allow for multiple news server ...

Re: [GENERAL] Visual Designer in linux?

2004-11-06 Thread Alvaro Herrera Munoz
On Sat, Nov 06, 2004 at 10:32:30PM -0500, Eric wrote: Is there a visual designer (open source) in linux for database? I would like to developp my data model on the computer... I see dia with uml library but... it won't export to SQL. You can have UML diagrams exported to SQL with some Perl

Re: [GENERAL] SQL question

2004-11-06 Thread Vincent Hikida
I'm afraid, I'm not used to SQL92 join syntax and almost all my experience is in Oracle but how about: SELECT t1.uid , t1.xname , t2.uid , t3.uid FROM table1 t1 INNER JOIN table2 t2 ON t1.uid = t2.uid