Re: [HACKERS] Can we modify 'text *' passed to a C function?

2001-02-05 Thread m w
--- Tom Lane <[EMAIL PROTECTED]> wrote: > m w <[EMAIL PROTECTED]> writes: > > If I write a function that does a 'tolower()' on > each > > character of a parameter passed into my function, > do I > > have to allocate a new text object and initialize

[HACKERS] Can we modify 'text *' passed to a C function?

2001-02-05 Thread m w
If I write a function that does a 'tolower()' on each character of a parameter passed into my function, do I have to allocate a new text object and initialize it and copy the data, or can I modify that object in place and return it? Modifying it in place will save the overhead of an alloc call, a

[HACKERS] Subject: like vs '='

2001-02-05 Thread m w
> Subject: like vs '=' > > I have a function to transform text into a > pseudo-metaphone variable, take this > example: > > cddbsql=# select song, metatext(song) from cdsongs > where metatext(song) like > metatext('born to run') limit 3 ; > song | metatext > -+-- > B

[HACKERS] contrib

2001-02-04 Thread m w
Is there a formal way of submiting something to the contrib section of the distribution? __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

Re: [HACKERS] Like vs '=' bug with indexing

2001-02-04 Thread m w
--- Hannu Krosing <[EMAIL PROTECTED]> wrote: > Should we not examine "the _possible_ outputs of > every C-coded function > to make sure it produces a valid value of the > datatype" ;) > > For me producing an invalid data for a datatype > seems very much like > a bug and it _should_ be reporte

Re: [HACKERS] Like vs '=' bug with indexing

2001-02-03 Thread m w
Embedded zeroes aren't supported in > char/varchar/text fields, > and cannot be supported in a portable fashion, since > these datatypes > rely on functions like strcoll() that don't allow > embedded nulls in > strings. It wouldn't surprise me too much if there > are inconsistent > behaviors bet

Re: [HACKERS] Like vs '=' bug with indexing

2001-02-03 Thread m w
--- Tom Lane <[EMAIL PROTECTED]> wrote: > m w <[EMAIL PROTECTED]> writes: > > Here is the problem: Depending on whether there is > an > > index or not, 'like' behaves differently. > > Please provide a complete, self-contained example > with whic

Re: AW: AW: [HACKERS] Like vs '=' bug with indexing

2001-01-31 Thread m w
--- Zeugswetter Andreas SB <[EMAIL PROTECTED]> wrote: > > > > > I am reposting this because I'm not sure it > actually > > > > made it to the list. > > > > > > It did make it to the list, but can you give > more > > > details whether or which of the > > > following you use: > > > --enable-loc

[HACKERS] Like vs '=' bug with indexing

2001-01-30 Thread m w
I am reposting this because I'm not sure it actually made it to the list. I have a function to transform text into a pseudo-metaphone variable, take this example: cddbsql=# select song, metatext(song) from cdsongs where metatext(song) like metatext('born to run') limit 3 ; song | metate

Re: [HACKERS] Like vs '='

2001-01-30 Thread m w
In 7.1 the row limit is not as big a deal because of tuple toaster. I had a 7.0 database that needed the row limit change, in 7.1 it does not seem too. But if you want to chang it anyway, in config.h, look for this line: #define BLCKSZ 8192 It can be made as large as 32768. --- Manuel Cabido

[HACKERS] Like vs '='

2001-01-29 Thread m w
I have a function to transform text into a pseudo-metaphone variable, take this example: cddbsql=# select song, metatext(song) from cdsongs where metatext(song) like metatext('born to run') limit 3 ; song | metatext -+-- Born To Run | brntorn Born To Run | brntorn B