Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Jan Urbański
Peter Eisentraut wrote: On Monday 11 August 2008 16:23:29 Jan Urbański wrote: Often clients want their searches to be accented-or-language-specific letters insensitive. So searching for 'łódź' returns 'lodz'. So the use case is there (in fact, the lack of such facility made me consider not upgra

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Pavel Stehule
2008/8/11 Peter Eisentraut <[EMAIL PROTECTED]>: > On Monday 11 August 2008 16:23:29 Jan Urbański wrote: >> Often clients want their searches to be >> accented-or-language-specific letters insensitive. So searching for >> 'łódź' returns 'lodz'. So the use case is there (in fact, the lack of >> such

Re: [HACKERS] pltcl_*mod commands are broken on Solaris 10

2008-08-11 Thread Bruce Momjian
Zdenek Kotala wrote: > Tom Lane napsal(a): > > Zdenek Kotala <[EMAIL PROTECTED]> writes: > >> I understand. However I have another dumb idea/question - It seems to me > >> that it > >> is client code. I think that it should be integrated into psql > >> command. > > > > That doesn't seem like a p

[HACKERS] Plugin system like Firefox

2008-08-11 Thread Bruce Momjian
Matthew T. O'Connor wrote: > A few random thoughts... > > The application that comes to mind first for me when you talk plugins is > Firefox. They make it very easy to browse for plugins and to install, > update, remove them. Their plug-in system also tries to account for > Firefox version an

Re: [HACKERS] Plans for 8.4

2008-08-11 Thread Bruce Momjian
Added to TODO: * Add 'hostgss' pg_hba.conf option to allow GSS link-level encryption http://archives.postgresql.org/pgsql-hackers/2008-07/msg01454.php --- Henry B. Hotz wrote: > What's the time frame for 8.4? > > I'm m

Re: [HACKERS] IN vs EXISTS equivalence

2008-08-11 Thread Tom Lane
Decibel! <[EMAIL PROTECTED]> writes: > On Aug 8, 2008, at 3:23 PM, Tom Lane wrote: >> * has no set operations (UNION etc), grouping, set-returning functions >> in the SELECT list, LIMIT, or a few other funny cases > Couldn't union/union all be treated as > EXISTS(a) > OR EXISTS(b) Perhaps, but th

Re: [HACKERS] Mini improvement: statement_cost_limit

2008-08-11 Thread Casey Duncan
On Aug 4, 2008, at 1:04 PM, daveg wrote: Ok, that is a different use case where an error seems very useful. What about slightly extending the proposal to have the severity of exceeding the limit configurable too. Something like: costestimate_limit = 10 # default 0 to ignor

Re: [HACKERS] autovacuum and TOAST tables

2008-08-11 Thread Alvaro Herrera
Tom Lane wrote: > On second thought, I think it *could* lead to a visible failure. > Suppose the OID counter wraps around and the OID that had been used for > the temporary CLUSTER table gets assigned to a new table. If that table > needs a toast table, it'll try to create one using the name that

Re: [HACKERS] autovacuum and TOAST tables

2008-08-11 Thread Tom Lane
I wrote: > Hmm, we could probably fix that if we made the cluster operation swap > the physical storage of the two toast tables, rather than swapping the > tables altogether. I agree it's not critical but it could be confusing. On second thought, I think it *could* lead to a visible failure. Supp

Re: [HACKERS] autovacuum and TOAST tables

2008-08-11 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > BTW only now I notice that CLUSTER leaves the toast table name in bad > shape: if you create a table with OID X its TOAST table is named > pg_toast_X. If you then cluster this table, a new transient table gets > created with OID Y; the TOAST table for Y

Re: [HACKERS] autovacuum and TOAST tables

2008-08-11 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Note that this patch allows a toast table to be vacuumed by the user: > > I don't have a problem with that, but if anyone thinks this is not a > > good idea, please speak up. > > The permissions on pg_toast will prevent anyone but a

Re: [HACKERS] IN vs EXISTS equivalence

2008-08-11 Thread Gregory Stark
"Decibel!" <[EMAIL PROTECTED]> writes: > On Aug 8, 2008, at 3:23 PM, Tom Lane wrote: >> * has no set operations (UNION etc), grouping, set-returning functions >> in the SELECT list, LIMIT, or a few other funny cases > > > Couldn't union/union all be treated as > > EXISTS(a) > OR EXISTS(b) Kind of

Re: Column level privileges was:(Re: [HACKERS] Extending grant insert on tables to sequences)

2008-08-11 Thread Jaime Casanova
On 7/25/08, Stephen Frost <[EMAIL PROTECTED]> wrote: > * Jaime Casanova ([EMAIL PROTECTED]) wrote: > > ok, seems this is the last one for column level patch > > http://archives.postgresql.org/pgsql-patches/2008-04/msg00417.php > > > > any one working it... > > Yes, I'm working on it hi, any work o

Re: [HACKERS] IN vs EXISTS equivalence

2008-08-11 Thread Kevin Grittner
Our Internet connectivity failed as this was being sent. It looks like at least the list didn't get it, so here goes another try. Apologies for any duplication. -Kevin >>> Tom Lane <[EMAIL PROTECTED]> wrote: > I chewed on that for awhile. We can certainly optimize EXISTS that's > appear

Re: [HACKERS] Mini improvement: statement_cost_limit

2008-08-11 Thread Decibel!
On Aug 4, 2008, at 3:49 PM, Simon Riggs wrote: On Mon, 2008-08-04 at 14:35 -0400, Robert Treat wrote: On Monday 04 August 2008 03:50:40 daveg wrote: And you'll note, I specifically said that a crude tool is better than nothing. But your completely ignoring that a crude tool can often end-up a

Re: [HACKERS] Mini improvement: statement_cost_limit

2008-08-11 Thread Decibel!
On Aug 3, 2008, at 9:57 PM, Robert Treat wrote: I think a variation on this could be very useful in development and test environments. Suppose it raised a warning or notice if the cost was over the limit. Then one could set a limit of a few million on the development and test servers and de

Re: [HACKERS] Visibility Groups

2008-08-11 Thread Decibel!
On Aug 7, 2008, at 9:49 AM, Robert Haas wrote: This proposal sounds like it would target batch jobs, because those are the kinds of jobs that where you can predict in advance what tables will be needed. I don't know whether my personal set of problems with MVCC syncs up with anyone else's, but t

Re: [HACKERS] IN vs EXISTS equivalence

2008-08-11 Thread Decibel!
On Aug 8, 2008, at 3:23 PM, Tom Lane wrote: * has no set operations (UNION etc), grouping, set-returning functions in the SELECT list, LIMIT, or a few other funny cases Couldn't union/union all be treated as EXISTS(a) OR EXISTS(b) ... Or am I missing some detail with NULLS? Personally, I'd

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Peter Eisentraut
On Monday 11 August 2008 16:23:29 Jan Urbański wrote: > Often clients want their searches to be > accented-or-language-specific letters insensitive. So searching for > 'łódź' returns 'lodz'. So the use case is there (in fact, the lack of > such facility made me consider not upgrading particular cli

Re: [HACKERS] Type Categories for User-Defined Types

2008-08-11 Thread David E. Wheeler
On Aug 10, 2008, at 20:58, David E. Wheeler wrote: Just realized that I forgot to add the DROP FUNCTION statements to the uninstall script. New patch attached. And this one also includes the casts I added. :-) Best, David citext_casting3.patch.gz Description: GNU Zip compressed data --

Re: [HACKERS] IN vs EXISTS equivalence

2008-08-11 Thread Tom Lane
"Kevin Grittner" <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> wrote: >> I believe that the optimizable cases for EXISTS are those where the >> EXISTS() is either at the top level of WHERE, or just underneath a >> NOT, > The rest of the plan makes sense to me, but this part seems na

[HACKERS] WIP: New Page API

2008-08-11 Thread Zdenek Kotala
I finished first prototype of new page API. It contains several new functions like: Pointer PageGetUpperPointer(Page page); void PageClearPrunable(Page page); bool PageIsComprimable(Page page); void PageReserveLinp(Page page); void PageReleaseLinp(Page page); LocationIndex PageGetLower(Page p

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Pavel Stehule
2008/8/11 Andrew Dunstan <[EMAIL PROTECTED]>: > > > Pavel Stehule wrote: >> >> 2008/8/11 Andrew Dunstan <[EMAIL PROTECTED]>: >> >>> >>> Pavel Stehule wrote: >>> > > But what would be the meaning of this?: > > to_ascii(bytea, integer) > > > it's symmetric. Noth

Re: [HACKERS] Question regarding the database page layout.

2008-08-11 Thread Ryan Bradetich
Hello Greg, On Mon, Aug 11, 2008 at 2:24 AM, Gregory Stark <[EMAIL PROTECTED]>wrote: > "Ryan Bradetich" <[EMAIL PROTECTED]> writes: > > > After a cursory glance at the HeapTupleHeaderData structure, it appears > it > > could be aligned with INTALIGN instead of MAXALIGN. The one structure I > was

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Andrew Dunstan
Pavel Stehule wrote: 2008/8/11 Andrew Dunstan <[EMAIL PROTECTED]>: Pavel Stehule wrote: But what would be the meaning of this?: to_ascii(bytea, integer) it's symmetric. Nothing more. Symmetric to what? What is the second argument supposed to be? postgre

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Pavel Stehule
2008/8/11 Andrew Dunstan <[EMAIL PROTECTED]>: > > > Pavel Stehule wrote: >>> >>> But what would be the meaning of this?: >>> >>> to_ascii(bytea, integer) >>> >>> >> >> it's symmetric. Nothing more. >> >> > > Symmetric to what? What is the second argument supposed to be? > postgres=# \df to_ascii

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Andrew Dunstan
Pavel Stehule wrote: But what would be the meaning of this?: to_ascii(bytea, integer) it's symmetric. Nothing more. Symmetric to what? What is the second argument supposed to be? cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make cha

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Pavel Stehule
2008/8/11 Andrew Dunstan <[EMAIL PROTECTED]>: > > > Jan Urbański wrote: >> >> Andrew Dunstan wrote: >>> >>> >>> Pavel Stehule wrote: One note - convert_to is correct. But we have to use to_ascii without decode functions. It has same behave - convert from bytea to text. Text

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Pavel Stehule
2008/8/11 Andrew Dunstan <[EMAIL PROTECTED]>: > > > Pavel Stehule wrote: >> >> >> One note - convert_to is correct. But we have to use to_ascii without >> decode functions. It has same behave - convert from bytea to text. >> Text in "incorrect" encoding is dafacto bytea. So correct to_ascii >> func

Re: [HACKERS] Proposal: PageLayout footprint

2008-08-11 Thread Zdenek Kotala
Heikki Linnakangas napsal(a): Zdenek Kotala wrote: It is what I don't know. controlfile only says "incorrect checksum in control file". It seems to me that CRC computing does not work correctly. I check pg_control footprint and it is same for 32/64. It seems to me a false positive complain, b

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Jan Urbański
Andrew Dunstan wrote: Jan Urbański wrote: Andrew Dunstan wrote: Pavel Stehule wrote: What you have not said is how you propose to convert UTF8 to ASCII. Currently to_ascii() converts a small number of single byte charsets to ASCII by folding the chars with high bits set, so what we get is

Re: [HACKERS] Proposal: PageLayout footprint

2008-08-11 Thread Heikki Linnakangas
Zdenek Kotala wrote: It is what I don't know. controlfile only says "incorrect checksum in control file". It seems to me that CRC computing does not work correctly. I check pg_control footprint and it is same for 32/64. It seems to me a false positive complain, but ... Endianness perhaps? Pe

Re: [HACKERS] Proposal: PageLayout footprint

2008-08-11 Thread Zdenek Kotala
Heikki Linnakangas napsal(a): Zdenek Kotala wrote: Similar is 32/64 bit compilation. It is handled on x86 by MAXALIGN but MAXALIGN is same on SPARC for both binaries, but I'm not sure if it works correctly. Are 32/64-bit binaries on Sparc incompatible, then? Does our control file check catch

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Andrew Dunstan
Jan Urbański wrote: Andrew Dunstan wrote: Pavel Stehule wrote: One note - convert_to is correct. But we have to use to_ascii without decode functions. It has same behave - convert from bytea to text. Text in "incorrect" encoding is dafacto bytea. So correct to_ascii function prototypes ar

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Jan Urbański
Andrew Dunstan wrote: Pavel Stehule wrote: One note - convert_to is correct. But we have to use to_ascii without decode functions. It has same behave - convert from bytea to text. Text in "incorrect" encoding is dafacto bytea. So correct to_ascii function prototypes are: to_ascii(text) to_a

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Andrew Dunstan
Pavel Stehule wrote: One note - convert_to is correct. But we have to use to_ascii without decode functions. It has same behave - convert from bytea to text. Text in "incorrect" encoding is dafacto bytea. So correct to_ascii function prototypes are: to_ascii(text) to_ascii(bytea, integer); t

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Pavel Stehule
2008/8/11 Andrew Dunstan <[EMAIL PROTECTED]>: > > > Pavel Stehule wrote: >> >> Hello, >> >> combination functions to_ascii and convert_to is broken now. Problem >> is in convert_to function. It doesn't support 8bit output encoding. >> >> Current workaround: >> >> CREATE FUNCTION to_ascii(bytea, nam

Re: [HACKERS] Proposal: PageLayout footprint

2008-08-11 Thread Heikki Linnakangas
Zdenek Kotala wrote: Similar is 32/64 bit compilation. It is handled on x86 by MAXALIGN but MAXALIGN is same on SPARC for both binaries, but I'm not sure if it works correctly. Are 32/64-bit binaries on Sparc incompatible, then? Does our control file check catch it? If not, what's causing it,

Re: [HACKERS] Skimming icc warnings on mongoose

2008-08-11 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > I happened to be skimming the compile warnings on mongoose, an icc buildfarm > member and noticed two interesting warnings. > ld: warning: creating a DT_TEXTREL in object. > There are a few instances of this. I think it indicates we are either spelling >

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Pavel Stehule
Hello 2008/8/11 Andrew Dunstan <[EMAIL PROTECTED]>: > > > Pavel Stehule wrote: >> >> Hello, >> >> combination functions to_ascii and convert_to is broken now. Problem >> is in convert_to function. It doesn't support 8bit output encoding. >> >> Current workaround: >> >> CREATE FUNCTION to_ascii(byt

[HACKERS] Skimming icc warnings on mongoose

2008-08-11 Thread Gregory Stark
I happened to be skimming the compile warnings on mongoose, an icc buildfarm member and noticed two interesting warnings. icc -O3 -xN -parallel -ip -mp1 -fno-strict-aliasing -g -fpic -I../../../src/include/snowball -I../../../src/i

Re: [HACKERS] Proposal: PageLayout footprint

2008-08-11 Thread Zdenek Kotala
Heikki Linnakangas napsal(a): Zdenek Kotala wrote: By my opinion -fipa-struct-reorg GCC option could break structure. That option would probably break a lot of things. Like our "variable-sized array as last field of a struct" hacks. Yes, it is extreme case. And maybe there are more compile

Re: [HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Andrew Dunstan
Pavel Stehule wrote: Hello, combination functions to_ascii and convert_to is broken now. Problem is in convert_to function. It doesn't support 8bit output encoding. Current workaround: CREATE FUNCTION to_ascii(bytea, name) RETURNS text AS 'to_ascii_encname' LANGUAGE internal; SELECT to_asci

Re: [HACKERS] Proposal: PageLayout footprint

2008-08-11 Thread Heikki Linnakangas
Gregory Stark wrote: "Zdenek Kotala" <[EMAIL PROTECTED]> writes: By my opinion -fipa-struct-reorg GCC option could break structure. And maybe there are more compiler magic switches and optimization on different platforms which can modify structure alignment or member order. It probably does not

Re: [HACKERS] Proposal: PageLayout footprint

2008-08-11 Thread Gregory Stark
"Zdenek Kotala" <[EMAIL PROTECTED]> writes: > By my opinion -fipa-struct-reorg GCC option could break structure. And maybe > there are more compiler magic switches and optimization on different platforms > which can modify structure alignment or member order. It probably does not > happen often bu

Re: [HACKERS] Proposal: PageLayout footprint

2008-08-11 Thread Heikki Linnakangas
Zdenek Kotala wrote: By my opinion -fipa-struct-reorg GCC option could break structure. That option would probably break a lot of things. Like our "variable-sized array as last field of a struct" hacks. And maybe there are more compiler magic switches and optimization on different platform

Re: [HACKERS] Multiple anyelement types

2008-08-11 Thread Pavel Stehule
He 2008/8/11 ITAGAKI Takahiro <[EMAIL PROTECTED]>: > I'm working on improvements of orafce. > http://pgfoundry.org/projects/orafce > > I found postgres supports only one type of anyelement at one time > when I added nvl2() and decode(). I'd like to use multiple types of > anyelement something like

Re: [HACKERS] Proposal: PageLayout footprint

2008-08-11 Thread Zdenek Kotala
Heikki Linnakangas napsal(a): Zdenek Kotala wrote: Current content of control file is insufficient to check if database is compatible with postgres server. It is? Do you have an example of where it's insufficient? Current control file contain following information (related to page layout):

[HACKERS] Multiple anyelement types

2008-08-11 Thread ITAGAKI Takahiro
I'm working on improvements of orafce. http://pgfoundry.org/projects/orafce I found postgres supports only one type of anyelement at one time when I added nvl2() and decode(). I'd like to use multiple types of anyelement something like: template < typename Expr, typename Ret > CREATE FUNCTION

Re: [HACKERS] Question regarding the database page layout.

2008-08-11 Thread Gregory Stark
"Ryan Bradetich" <[EMAIL PROTECTED]> writes: > After a cursory glance at the HeapTupleHeaderData structure, it appears it > could be aligned with INTALIGN instead of MAXALIGN. The one structure I was > worried about was the 6 byte t_ctid structure. The comments in > src/include/storage/itemptr.h f

Re: [HACKERS] Parsing of pg_hba.conf and authentication inconsistencies

2008-08-11 Thread Magnus Hagander
Stephen Frost wrote: > Magnus, > > * Magnus Hagander ([EMAIL PROTECTED]) wrote: >> Yeah. I think the question there is just - how likely is it that the >> same installation actually uses >1 authentication method. Personally, I >> think it's not very uncommon at all, but fact remains that as long a

Re: [HACKERS] gsoc, oprrest function for text search take 2

2008-08-11 Thread Heikki Linnakangas
Jan Urbański wrote: Heikki Linnakangas wrote: Jan Urbański wrote: Another thing are cstring_to_text_with_len calls. I'm doing them so I can use bttextcmp in bsearch(). I think I could come up with a dedicated function to return text Datums and WordEntries (read: non-NULL terminated strings wi

[HACKERS] Question regarding the database page layout.

2008-08-11 Thread Ryan Bradetich
Hello all, I have been digging into the database page layout (specifically the tuples) to ensure the unsigned integer types were consuming the proper storage. While digging around, I found one thing surprising: It appears the heap tuples are padded at the end to the MAXALIGN distance. Below is m

Re: [HACKERS] Proposal: PageLayout footprint

2008-08-11 Thread Heikki Linnakangas
Zdenek Kotala wrote: Current content of control file is insufficient to check if database is compatible with postgres server. It is? Do you have an example of where it's insufficient? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list

[HACKERS] proposal: UTF8 to_ascii function

2008-08-11 Thread Pavel Stehule
Hello, combination functions to_ascii and convert_to is broken now. Problem is in convert_to function. It doesn't support 8bit output encoding. Current workaround: CREATE FUNCTION to_ascii(bytea, name) RETURNS text AS 'to_ascii_encname' LANGUAGE internal; SELECT to_ascii(convert_to('Příliš žlut