[SQL] What is wrong with this PostgreSQL UPDATE statement??

2008-08-22 Thread Steve Johnson
Sorry for the fairly long post. I'm having a big problem trying to update one table from another in PostgreSQL 8.3.1. I have a lookup table called termgroup: # select * from termgroup; termgroupname | mindays | maxdays ---+-+- 1-30 days | 1 | 30 31-59

Re: [SQL] What is wrong with this PostgreSQL UPDATE statement??

2008-08-22 Thread Stephan Szabo
On Fri, 22 Aug 2008, Steve Johnson wrote: update certgroups set termgroupname = tg.termgroupname from certgroups c, termgroup tg where (c.days = tg.mindays) and (c.days = tg.maxdays); In recent PostgreSQL versions I believe this is properly written: update certgroups c set termgroupname =

Re: [SQL] What is wrong with this PostgreSQL UPDATE statement??

2008-08-22 Thread Tom Lane
Stephan Szabo [EMAIL PROTECTED] writes: On Fri, 22 Aug 2008, Steve Johnson wrote: update certgroups set termgroupname = tg.termgroupname from certgroups c, termgroup tg where (c.days = tg.mindays) and (c.days = tg.maxdays); In recent PostgreSQL versions I believe this is properly written:

Re: [SQL] What is wrong with this identification configuration?

2003-02-11 Thread Wei Weng
SNIP The format of the hba.conf file changed between 7.1 and 7.2. It looks like you are using an old one. After the database field, there is now a user field. To get the same effect as before, use 'all' for the user. I installed PostgreSQL rpm on a fresh installed Redhat 7.3. There is no

Re: [SQL] What is wrong?

2001-09-29 Thread Stephan Szabo
On 28 Sep 2001, Wei Weng wrote: Hi there. I wrote a simple postgresql sql function as follows: create function test() returns integer as ' begin fixed_path := translate (''/text'', ''\\'', ''/''); raise notice ''fixed_path:'', fixed_path; return 1; end ' language 'plpgsql'; And

[SQL] What is wrong?

2001-09-28 Thread Wei Weng
Hi there. I wrote a simple postgresql sql function as follows: create function test() returns integer as ' begin fixed_path := translate (''/text'', ''\\'', ''/''); raise notice ''fixed_path:'', fixed_path; return 1; end ' language 'plpgsql'; And when I ran it as pgsqlselect test(); I got: