Re: [GENERAL] Need PostgreSQL startup scripts

2001-04-02 Thread Peter Eisentraut
Justin Clift writes: Now that I know you are already addressing this, I'm not sure they need to be on the techdocs site. I don't think we should have too much duplication and therefore wasted effort. Do you think it would be better to remove the startup scripts section from the techdocs

Re: [GENERAL] Can I get the default value for an attribute (field) ?

2001-04-02 Thread ADBAAMD
Mike Mascari wrote: If you start psql with the -E option you'll see it generates a query similar to the following: SELECT substring(d.adsrc for 128) FROM pg_attrdef d, pg_class c WHERE c.relname = 'my_table' AND c.oid = d.adrelid NAD d.adnum = X where my_table is the table in question

[GENERAL] What could be the reason for EXTREMELY slow INSERTs?

2001-04-02 Thread Daniel ?erud
I have this little test application that compares retreiving and inserting data using indexes and not using indexes. I have tried this program on two different machines. One is a PIII 533 256 meg memory and SCSI. The other one is a dual 400 (something) 512 meg memory. The thing is that the

Re: [GENERAL] What could be the reason for EXTREMELY slow INSERTs?

2001-04-02 Thread Tom Lane
Daniel ?erud [EMAIL PROTECTED] writes: 1 inserts takes 665 seconds on the PIII 533, while on the dual 400 it takes about 13 seconds (*GULP!*). Maybe postmaster running with -F on one system but not the other? Or referential integrity checks defined on one table and not the other?

Re: [GENERAL] What could be the reason for EXTREMELY slow INSERTs?

2001-04-02 Thread Poul L. Christiansen
Try to run a vacuum on the box with slow inserts (don't know if that helps, though). Run a /sbin/hdparm -t harddisk, to compare the speed of the harddisks. HTH, Poul L. Christiansen Daniel ?erud wrote: I have this little test application that compares retreiving and inserting data using

Re: [GENERAL] function to operate on same fields, different records?

2001-04-02 Thread will trillich
On Mon, Apr 02, 2001 at 10:21:34AM -0400, Tom Lane wrote: will trillich [EMAIL PROTECTED] writes: i've tried create function gpa(OPAQUE) and psql tells me it successfully CREATED something, but \df shows no such function. I believe \df suppresses opaque-argument

[GENERAL] problem with subselect: NOT IN

2001-04-02 Thread Kevin L
Hi. here's my scenario: table employee has emp_id and employee details. table salesorder has emp_id and sales details. The following works fine: (get all employees who have sold something) SELECT emp_id FROM employee WHERE emp_id IN (SELECT emp_id FROM salesorder); However, getting employees

[GENERAL] Re: bitwise again

2001-04-02 Thread Philip Hallstrom
As someone else pointed out you can upgrade to 7.1. Or you can add your own operators/functions. I've included the C source and SQL create script. You'll need to do this as the postgres superuser. And you'll probably need to edit the SQL script and adjust the path of the .so file. The .c

Re: [GENERAL] problem with subselect: NOT IN

2001-04-02 Thread Patrik Kudo
Hi To start with, I think your queries will be faster if you don't use IN, but instead used regular joins or EXISTS whenever possible On Mon, 2 Apr 2001, Kevin L wrote: The following works fine: (get all employees who have sold something) SELECT emp_id FROM employee WHERE emp_id IN (SELECT

Re: [GENERAL] problem with subselect: NOT IN

2001-04-02 Thread Peter Eisentraut
Kevin L writes: However, getting employees who have NOT sold something always returns zero rows: SELECT emp_id FROM employee WHERE emp_id NOT IN (SELECT emp_id FROM workorder); Are there any NULL values in workorder.emp_id? If so, you need to exclude them (... FROM workorder WHERE emp_id

Re: [GENERAL] problem with subselect: NOT IN

2001-04-02 Thread Tom Lane
Kevin L [EMAIL PROTECTED] writes: However, getting employees who have NOT sold something always returns zero rows: SELECT emp_id FROM employee WHERE emp_id NOT IN (SELECT emp_id FROM workorder); Probably you have some NULL values in workorder. See past discussions about why NOT IN and NULL

[GENERAL] reindexing sequences

2001-04-02 Thread mike
is there a way to reindex a sequence? if so how and is it in the curent docs? Mike

Re: [GENERAL] What could be the reason for EXTREMELY slow INSERTs?

2001-04-02 Thread Richard Huxton
Daniel ?erud wrote: 1 inserts takes 665 seconds on the PIII 533, while on the dual 400 it takes about 13 seconds (*GULP!*). I have done a clean reinstallation (dpkg --purge postgresql, apt- get install postgresql) and tried it again. Same results. Do you guys know what could be the

Re: [GENERAL] reindexing sequences

2001-04-02 Thread Tom Lane
"mike" [EMAIL PROTECTED] writes: is there a way to reindex a sequence? Sequences don't have indexes, so they don't need reindexing. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet,

Re: [GENERAL] compile error

2001-04-02 Thread Soma Interesting
At 11:03 AM 4/2/2001 -0700, you wrote: linking ./include/port to interfaces/odbc/port mkdir: cannot create directory `interfaces/odbc': No such file or directory ln: ./include/port: hard link not allowed for directory configure: error: can not link interfaces/odbc/port to ./include/port Ok, that

Re: [GENERAL] Cascading deletes with rules in 7.0.3: why doesn't this work?

2001-04-02 Thread Jeremy Radlow
Thanks for the insight. The problem is that logging ax is basically a convenience for the end user. (A is a user table) I must reference B from C. If I also add an A reference to C, I want the A reference to be automatically maintained at the database level. And this is where things start

Re: [GENERAL] compile error

2001-04-02 Thread Tom Lane
Soma Interesting [EMAIL PROTECTED] writes: Judging by the mailing list archives, lots of people have ran into this, but none received answers. You must not have looked in the right threads. If you're building interfaces/perl5 by hand (ie, not letting src/interfaces/Makefile do it for you)

[GENERAL] Interval representation?

2001-04-02 Thread Alvaro Herrera
Hi guys - This is today's CVS: db= select 1::interval; ERROR: Bad interval external representation '1' And this is 7.0.3: db= select 1::interval; ?column? -- 00:00:01 (1 row) Am I missing something? -- Alvaro Herrera (alvherre[@]atentus.com) ---(end of

[GENERAL] How to display constraints?

2001-04-02 Thread Stephen Davies
The searchable archives seem to be unavailable today. Could somebody please tell me how to display the constraints that have been defined for a given table (or all tables). Is it possible to dump the original SQL DDL for a database or table? That is, not just the \d information but the

Re: [GENERAL] compile error

2001-04-02 Thread Soma Interesting
At 06:38 PM 4/2/2001 -0400, you wrote: Soma Interesting [EMAIL PROTECTED] writes: Judging by the mailing list archives, lots of people have ran into this, but none received answers. You must not have looked in the right threads. If you're building interfaces/perl5 by hand (ie, not letting

Re: [GENERAL] compile error

2001-04-02 Thread Tom Lane
Soma Interesting [EMAIL PROTECTED] writes: ERROR: Load of file /usr/lib/pgsql/lib/plperl.so failed: libperl.so: cannot open shared object file: No such file or directory. Is libperl.so known to your dynamic linker? It has to be found via LD_LIBRARY_PATH, /etc/ld.so.conf, or local

RE: [GENERAL] Log file to sql database

2001-04-02 Thread Joseph
I would like to log cisco pix entries and then use that to report on intrusion activities and monitor traffic patterns. respectfully, Joseph -Original Message- From: Ben [mailto:[EMAIL PROTECTED]] Sent: Monday, April 02, 2001 11:22 AM To: Joseph Cc: [EMAIL PROTECTED] Subject: Re:

RE: [GENERAL] Log file to sql database

2001-04-02 Thread Joseph
Thanks for the great anwsers. I recieved good answers. I had not even started thinking about the normalization part of it yet. I am not sure I understand the implications of the piping it to the insert routine. That sure would sound like a simple effective method. respectfully, Joseph

RE: [GENERAL] Log file to sql database

2001-04-02 Thread KuroiNeko
I am not sure I understand the implications of the piping it to the insert routine. It's a double-edged sword. Invoking it is as simple as adding a line to a conf file, while developing it may turn out to be tricky. At least make sure you examine output of ps ax to see how much

Re: [GENERAL] Log file to sql database

2001-04-02 Thread Doug McNaught
KuroiNeko [EMAIL PROTECTED] writes: I am not sure I understand the implications of the piping it to the insert routine. It's a double-edged sword. Invoking it is as simple as adding a line to a conf file, while developing it may turn out to be tricky. At least make sure

Re: [GENERAL] Log file to sql database

2001-04-02 Thread KuroiNeko
Also, if your pipe reader slows down too much, syslogd will start blocking on the pipe Indeed. So I think it'd be much safer to have a flat text logfile and have your program read from that Or send the data to DB backend only when the logs are rotated. As long as the logs are kept short,

Re: [GENERAL] reindexing sequences

2001-04-02 Thread Richard Huxton
From: "mike" [EMAIL PROTECTED] is there a way to reindex a sequence? if so how and is it in the curent docs? Mike Reindex a sequence? Not sure what you mean by that. You can set the value to something else: select setval('mysequence',12345); If you mean compact the values used so there