Re: [SQL] Problem whith Stored queries

2000-10-26 Thread Jie Liang
Hi, anybody know how to call shell command in postgres rule or trigger, urgent!! -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

[SQL] Query Problem

2000-10-26 Thread Josh Berkus
Folks: Here's the problem, in abstract: I need to select every record in table A that does not have a link in table B Join Table C where Table C.account = 11 The relevant fields: Table_A CaseID Data Table_B GroupID CaseID Amount Table_C GroupID AccountID Thus, I need to select: SELECT

Re: [SQL] Surprising sequence scan when function call used

2000-10-26 Thread Hosokawa Tetsuichi
see functional index On Wed, 25 Oct 2000 13:26:51 -0400 "Will Fitzgerald" [EMAIL PROTECTED] wrote: I have a table, login, which has a field by the same name; there's an index on that field. I was surprised to discover that a SELECT which compares the login field to a constant uses an Index

Re: [SQL] Add Constraint

2000-10-26 Thread Stephan Szabo
On Wed, 25 Oct 2000, Sivagami . wrote: Hi all, I am a newbie to Postgresql, but I am familiar with SQL. I am trying to add a constraint to my table using the ALTER TABLE command. The command goes like this : ALTER TABLE USER_SIGNUP ADD CONSTRAINT P_USER_SIGNUP_USER_ID PRIMARY

Re: [SQL] Alternate Database Locations

2000-10-26 Thread Brian C. Doyle
Okay I am still doing something wrong here I set PGDATA2=/home/user1/database export PGDATA2 then I start postmaster postmaster -d PGDATA2 -i -p 5431 and i get Can't create pid file: /usr/local/pgsql/data/postmaster.pid Is another postmaster (pid: 10686) running? What am I missing... I know

Re: [SQL] Query Problem

2000-10-26 Thread Josh Berkus
Michael, SELECT Data FROM Table A WHERE NOT EXISTS ( SELECT * FROM Table_B, Table_C WHERE Table_B.GroupID = TableC.GroupID AND TableC.AccountID = 11 ) I think that the not exists is a bit quicker than the NOT IN. Give it a whirl. A *lot* faster. Like, 7x as fast. I'd

[SQL] average time

2000-10-26 Thread Ulf Mehlig
Hello out there, an ignorant's question: can I/how can I create an aggregate that performs this operation on a group of timestamp values: select some_column, min(timest)+(max(timest)-min(timest))/2 from mytable group by some_column; that is, an aggregate which

Re: [SQL] Alternate Database Locations

2000-10-26 Thread indraneel
AFAIK the port number is compiled in, so you need to recompile. It's there in the docs somewhere. you have to use a different value for --with-pgport option in ./configure . On Wed, 25 Oct 2000, Brian C. Doyle wrote: I am still trying to find out how to get multiple postmasters running on

Re: [SQL] plperl

2000-10-26 Thread Peter Eisentraut
Jie Liang writes: "../../../src/Makefile.global", line 304: Need an operator make: fatal errors encountered -- cannot continue su-2.04# what I need to do? Use GNU make. -- Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/

Re: [SQL] pg_atoi: error in template1: can't parse template1

2000-10-26 Thread Tom Lane
Dronamraju Rajesh [EMAIL PROTECTED] writes: I have installed postgres 6.5.1 on my RedHat Linux box. The installation went smooth without any problems. Now when i run initdb I got errors. Adding template1 database to pg_database... ERROR: pg_atoi: error in "template1": can't parse