Re: [HACKERS] Role privileges in PostgreSQL.

2007-05-25 Thread Tom Lane
"Akmal Akmalhojaev" <[EMAIL PROTECTED]> writes: > I have the following question: where role privileges on working with tables, > data bases and so on are stored in PostgreSQL (In what system catalogs?)? Privileges are attached to the target objects, eg pg_class.relacl for relations. Look for colu

[HACKERS] Autovacuum versus rolled-back transactions

2007-05-25 Thread Tom Lane
The pgstats subsystem does not correctly account for the effects of failed transactions. Note the live/dead tuple counts in this example: regression=# create table foo (f1 int); CREATE TABLE regression=# insert into foo select x from generate_series(1,1000) x; INSERT 0 1000 -- wait a second for s

[HACKERS] Role privileges in PostgreSQL.

2007-05-25 Thread Akmal Akmalhojaev
Hello. I have the following question: where role privileges on working with tables, data bases and so on are stored in PostgreSQL (In what system catalogs?)? Thanks. Akmal.

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Jaime Casanova
On 5/25/07, Bernd Helmle <[EMAIL PROTECTED]> wrote: --On Freitag, Mai 25, 2007 00:02:06 + Jaime Casanova <[EMAIL PROTECTED]> wrote: >> > > sounds good. can we see the new patch? Attached tablespace.c.diff shows my current changes to use an OID lookup list. > + if (source >= PGC_S_I

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Jaime Casanova
On 5/25/07, Tom Lane <[EMAIL PROTECTED]> wrote: Bernd Helmle <[EMAIL PROTECTED]> writes: > --On Freitag, Mai 25, 2007 10:49:29 + Jaime Casanova > <[EMAIL PROTECTED]> wrote: >> No, because the RemovePgTempFiles() call in PostmasterMain() will >> remove all tmp files at startup. I believe we d

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Tom Lane
Bernd Helmle <[EMAIL PROTECTED]> writes: > --On Freitag, Mai 25, 2007 10:49:29 + Jaime Casanova > <[EMAIL PROTECTED]> wrote: >> No, because the RemovePgTempFiles() call in PostmasterMain() will >> remove all tmp files at startup. > Hmm isn't RemovePgTempFiles() called on postmaster startup on

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Bernd Helmle
--On Freitag, Mai 25, 2007 00:02:06 + Jaime Casanova <[EMAIL PROTECTED]> wrote: the original patch is from Albert Cervera =) Ah, missed that, thanks ;) sounds good. can we see the new patch? Attached tablespace.c.diff shows my current changes to use an OID lookup list. the

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Bernd Helmle
--On Freitag, Mai 25, 2007 10:49:29 + Jaime Casanova <[EMAIL PROTECTED]> wrote: No, because the RemovePgTempFiles() call in PostmasterMain() will remove all tmp files at startup. Hmm isn't RemovePgTempFiles() called on postmaster startup only? What will happen if a temp tablespace is out

Re: [HACKERS] like/ilike improvements

2007-05-25 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > do { (t)++; (tlen)--} while ((*(t) & 0xC0) == 0x80 && tlen > 0) The while *must* test those two conditions in the other order. (Don't laugh --- we've had reproducible bugs before in which the backend dumped core because of running off the end of memo

Re: [HACKERS] like/ilike improvements

2007-05-25 Thread Tom Lane
"Zeugswetter Andreas ADI SD" <[EMAIL PROTECTED]> writes: >> You have to be on a first byte before you can meaningfully >> apply NextChar, and you have to use NextChar or else you >> don't count characters correctly (eg "__" must match 2 chars >> not 2 bytes). > Well, for utf8 NextChar could adv

Re: [HACKERS] like/ilike improvements

2007-05-25 Thread Andrew Dunstan
[EMAIL PROTECTED] wrote: Is it worth the effort to pre-process the pattern? For example: %% -> % This is already done, required by spec. %_ -> _% If applied recursively, this would automatically cover: %_% -> _% _%_ -> __% The 'benefit' would be that the pattern

Re: [HACKERS] like/ilike improvements

2007-05-25 Thread Andrew Dunstan
Zeugswetter Andreas ADI SD wrote: You have to be on a first byte before you can meaningfully apply NextChar, and you have to use NextChar or else you don't count characters correctly (eg "__" must match 2 chars not 2 bytes). Well, for utf8 NextChar could advance to the next char even

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Jaime Casanova
On 5/25/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Jaime Casanova" <[EMAIL PROTECTED]> writes: > On 5/24/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: >> What happens if you create a cursor that stores something (sort >> intermediate results?) in a temp tablespace, FETCH some from it, then >> someo

Re: [HACKERS] like/ilike improvements

2007-05-25 Thread Zeugswetter Andreas ADI SD
> > However, I have just about convinced myself that we don't need > > IsFirstByte for matching "_" for UTF8, either preceded by "%" or not, > > as it should always be true. Can anyone come up with a counter example? > > You have to be on a first byte before you can meaningfully > apply NextCh

Re: [HACKERS] Why not keeping positions in GIN?

2007-05-25 Thread Guillaume Smet
On 5/25/07, Hitoshi Harada <[EMAIL PROTECTED]> wrote: It's not only about Japanese. When you search "phrase" for text in English, the same logic above will be needed. I don't research about tsearch2 but is there any problem?? Also, in some case int-array inverted index needs the entry positions a