Re: [ADMIN] Is it safe to increase pg_attribute.atttypmod ?

2002-05-20 Thread Joe Conway
Nick Fankhauser wrote: > Hi- > > We need to increase the length of a varchar field, and couldn't find > a way to do it using "alter table". Since the alternative is copying > & re-creating a very large table, we starting poking around under > the hood & found that pg_attribute.atttypmod seem

Re: [ADMIN] Is it safe to increase pg_attribute.atttypmod ?

2002-05-20 Thread Tom Lane
"Nick Fankhauser" <[EMAIL PROTECTED]> writes: > The update to change a varchar(10) field to varchar(40) looked like this: > update pg_attribute set atttypmod = 44 > where attrelid = ( select oid from pg_class where relname = 'test' ) > and attname = 'oldtest' ; > Is this a smart thing to do? Yu

[ADMIN] Access by 1000 users to view postgres tables without recreating accounts?

2002-05-20 Thread Jameson C. Burt
Can one permit numerous users to view Postgresql tables (subject to per table permissions, of course), yet not need to recreate password entries for Postgresql's mostly duplication of /etc/passwd. That is, given one already administers 1000 users, can one keep the extra administration time for 100

[ADMIN] Is it safe to increase pg_attribute.atttypmod ?

2002-05-20 Thread Nick Fankhauser
Hi- We need to increase the length of a varchar field, and couldn't find a way to do it using "alter table". Since the alternative is copying & re-creating a very large table, we starting poking around under the hood & found that pg_attribute.atttypmod seems to be always equal to the length plus

Re: [ADMIN] Informacion

2002-05-20 Thread David Stanaway
On Mon, 2002-05-20 at 10:10, Luis Andaluz P, wrote: > En caso de que la base de datos se vaya a caer que pasos debo seguir para > levantarla Utilizando el log de transacciones Creo que esto es automático en la versión del postgresql mayor de 7,0. ¿Tu tienes un problema? Yo no tengo mucha prácti

Re: [ADMIN] Interval to number

2002-05-20 Thread Gareth Kirwan
Oh :( I'd given up waiting for a response. Thanks though Brian ... I currently have the triggered function: CREATE FUNCTION logSession () RETURNS opaque AS ' DECLARE client_rate numeric(10,2); period interval; to_charge numeric(10,2); BE

Re: [ADMIN] Interval to number

2002-05-20 Thread Brian McCane
EXTRACT is your friend :) SELECT EXTRACT(EPOCH FROM max(occurrance) - min(occurrance))::integer ; - brian k=# SELECT EXTRACT(EPOCH FROM now() - '2001-01-01') ; date_part 43583467.94995 (1 row) On Mon, 20 May 2002, Gareth Kirwan wrote: > > Postgres 7.2 > I have an interv

[ADMIN] Informacion

2002-05-20 Thread Luis Andaluz P,
En caso de que la base de datos se vaya a caer que pasos debo seguir para levantarla Utilizando el log de transacciones Att Luis Andaluz ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [ADMIN] Access by 1000 users to view postgres tables without recreating accounts?

2002-05-20 Thread Tom Lane
"Jameson C. Burt" <[EMAIL PROTECTED]> writes: > Can one permit numerous users to view Postgresql tables (subject to per > table permissions, of course), yet not need to recreate password entries > for Postgresql's mostly duplication of /etc/passwd. Let them all log in as a "guest" postgres user.

[ADMIN] Access by 1000 users to view postgres tables without recreating accounts?

2002-05-20 Thread Jameson C. Burt
Can one permit numerous users to view Postgresql tables (subject to per table permissions, of course), yet not need to recreate password entries for Postgresql's mostly duplication of /etc/passwd. That is, given one already administers 1000 users, can one keep the extra administration time for 100

Re: [ADMIN] Problem in User Securities

2002-05-20 Thread Joel Burton
The default security setup in PG is to allow all connections from localhost, w/o password. This should be changed. You'll find this in your $PGDATA directory, in the file pg_hba.conf. - J. Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton Knowledge Management & Technology Consu

[ADMIN] Interval to number

2002-05-20 Thread Gareth Kirwan
Postgres 7.2 I have an interval selected from a max(occurance) - min(occurance) where bla. I now want to multiply this by a rate - to create a charge... If I use to_char( interval, ''); I will get a seconds conversion - but that works on seconds since midnight - hence with a one day period.

[ADMIN] Problem in User Securities

2002-05-20 Thread shreedhar
Hello All, I am new to Postgres, While I was checking 'User Securities' in postgres I got the following problem. I created a user using 'createuser' command and gave superuser permissions. but while accessing database, even if we have not given '-W' password option it is entering into databas