From: Tony F. <to...@sy...> - 2004-08-12 20:54:10
|
On Thu, 2004-08-12 at 10:59, Robert Irving wrote: > On entering: psql template1 -U postgres -l > > I get > List of databases > Name | Owner | Encoding > -----------+------------+----------- > Standard | sql-ledger | SQL_ASCII > template0 | postgres | SQL_ASCII > template1 | postgres | SQL_ASCII > test | sql-ledger | SQL_ASCII > (4 rows) > > but trying to run any of the following results in: > > root@barnum sql-ledger # createlang plpgsql test > createlang: could not connect to database test: FATAL: user "root" does > not exist > root@barnum sql-ledger # createlang plpgsql Standard > createlang: could not connect to database Standard: FATAL: user "root" > does not exist > root@barnum sql-ledger # createlang plpgsql template1 > createlang: could not connect to database template1: FATAL: user "root" > does not exist > root@barnum sql-ledger # createlang plpgsql template1 > createlang: could not connect to database template1: FATAL: user "root" > does not exist > Your on the right track here but not quite there... The postgrsql command line tools connect to the DB using your current UNIX userid unless you specifify a different one. You have a couple options: # su - postgres # createlang plpgsl test # createlang plpgsl Standard # createlang plpgsl template1 - or - # createlang -U sql-ledger plpgsl test # createlang -U sql-ledger plpgsl Standard # createlang -U postgres plpgsl template1 ### I'm not 100% this works -- Tony Fraser to...@sy... Sybaspace Internet Solutions System Administrator phone: (250) 246-5368 fax: (250) 246-5398 |