Re: [SQL] Index to support LIKE '%suffix' queries

2006-02-25 Thread Alvaro Herrera
> > Florian Weimer <[EMAIL PROTECTED]> writes: > >> Is it possible to create an index to support queries of the form > >> "column LIKE '%suffix'" (similar to an ordinary index for LIKE > >> 'prefix%', which I also need)? It is possible to create a functional index on the reverse of the string. Yo

Re: [SQL] Index to support LIKE '%suffix' queries

2006-02-25 Thread Florian Weimer
* Tom Lane: > Florian Weimer <[EMAIL PROTECTED]> writes: >> Is it possible to create an index to support queries of the form >> "column LIKE '%suffix'" (similar to an ordinary index for LIKE >> 'prefix%', which I also need)? > > Sounds like what you *really* need is full-text search, not half > me

Re: [SQL] Index to support LIKE '%suffix' queries

2006-02-25 Thread Tom Lane
Florian Weimer <[EMAIL PROTECTED]> writes: > Is it possible to create an index to support queries of the form > "column LIKE '%suffix'" (similar to an ordinary index for LIKE > 'prefix%', which I also need)? Sounds like what you *really* need is full-text search, not half measures ... have you loo

Re: [SQL] Relation 0 does not exist

2006-02-25 Thread Alvaro Herrera
Yasuhiro Furuse wrote: > When I run SQL command, I've got the error messe 'Relation 0 doesn't exist' > and following log messages were generated. > After this error happens, I can not access database at all. > > Could you kindly advise why this kind of error happens? > > Regards, > y.furuse > >

Re: [SQL] After Trigger assignment to NEW

2006-02-25 Thread Stephan Szabo
On Sat, 25 Feb 2006, Achilleus Mantzios wrote: > O Owen Jacobson ?? Feb 24, 2006 : > > > Achilleus Mantzios wrote: > > > > > O Tom Lane ?? Feb 24, 2006 : > > > > > > > By definition, an AFTER trigger is too late to change what was > > > > stored. Use a BEFORE trigger. > > > > > >

[SQL] Index to support LIKE '%suffix' queries

2006-02-25 Thread Florian Weimer
Is it possible to create an index to support queries of the form "column LIKE '%suffix'" (similar to an ordinary index for LIKE 'prefix%', which I also need)? I could define a function which reverts strings (or revert them in the application) and use a normal B-tree index, but I wonder if there is

Re: [SQL] "Installing" dbLink

2006-02-25 Thread Richard C
Hi. Thanks for the assistance. I have another question. Is it possible to install this function on Window XP?"A. Kretschmer" <[EMAIL PROTECTED]> wrote: am 24.02.2006, um 11:48:44 + mailte Richard C folgendes:> Hi> > When I execute the query: > > SELECT *> FROM dblink('dbname=Bas','SELECT id FR

Re: [SQL] Obtaining client IP address

2006-02-25 Thread Alexis Paul Bertolini
Michael Fuhr wrote: On Sat, Feb 25, 2006 at 12:16:31AM +0100, Alexis Paul Bertolini wrote: The client has no idea what public IP it has. The server ought to know... however I haven't found how I could get this info into my query. What version of PostgreSQL are you running? In 8.0 and