Re: [SQL] small problem

2002-11-11 Thread dima
create table (...) (...) duration interval default 7 do you really think it's worth spending 12 bytes for your intervals? i usually use either timestamps or integers for intervals. btw, as i know default 7 would be 7 msecs :) hourDaytimestamp with time zome consider using it without a tim

Re: [SQL] Different size in the DATA directory

2002-11-01 Thread dima
Hi, in my production server a "du -hs" in the DATA directory returns 21GB in a newly installed server, after I restored the dumps from the production server, the "du -hs" gives me just 8GB why is there such a diference??? what should I do (besides buying bigger and bigger HDs) ??? VACUUM? --

Re: [SQL] alter user does not changes password

2002-10-01 Thread dima
> alter user camara with password 'canabis!'; > > but when I try to connect: > > $ psql -U camara dbcamara; > > User "camara" logs with no password If I use -W option of psql > It prompts for password and I can enter whatever I want... it accepts! > > It must be a feature.. not a bug.

Re: [SQL] Preventing DELETEs

2002-09-26 Thread dima
> I have a created a database and a table in it, > > I want to prevent "DELETES" on the table in this > database by everyone except superuser postgres. > even by me (the creator of this database and table) make superuser the database owner & grant the rights needed to the users ---

Re: [SQL] Effective usage without unique key -- suggestion

2002-09-19 Thread Dima Tkach
y, you won't be able to get away from vacuum'ing it... I *think* the second method should be (a little) more effective... I hope, it helps... Dima ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] Stripping white-space in SELECT statments

2002-09-19 Thread dima
> If I want to search for records where the first column (artnrgrpmtrln_1) > begins with > '201901 ', our system that uses the database creates the following SQL > statement: > > select artnrgrpmtrln_1 from sr where (artnrgrpmtrln_1>='201901 ' and > artnrgrpmtrln_1<='201901 ΓΏ' what does "our s

Re: [SQL] sql group by statement

2002-09-13 Thread dima
see the yesterday's thread about DISTINCT ON (non-standard Postgres feature) > I have a problem, which I'm not able to solve with a simple query : > > I need a resultset with distinct id's, but the max val2 of each id. > I tried to group by id, but though I need the pk in my resultset > I have t

Re: [SQL] the best way to get the topest 3 record in every group

2002-09-08 Thread dima
> There is a table like : > << > itemNo > supplier > purchaseDate > Price > Qty > << > Please provide an idea if I want to get the latest 3 puchase records for > each item and supplier. Thank you in advance. select * from table_name where supplier=value order by purchaseDate desc limit 3 ??? -