[SQL] Using "Without OIDs"

2004-05-18 Thread Richard Huxton
Ricardo Maia wrote: Hi, I'm from Brazil, and i have a question. Hi Ricardo, happy to help, but three points: 1. Always make sure you use "reply to all" on the PostgreSQL lists 2. For a new question, send a new message to [EMAIL PROTECTED], since most direct email to this address goes into my spa

Re: [SQL] I'M Sorry!

2004-05-18 Thread Ricardo Maia
And sorry because the subject... lol. > On Tue, 2004-05-18 at 15:26, Ricardo Maia wrote: > > Hi, > > > > I'm from Brazil, and i have a question. > > > > Exists some problem if i not uses the option "without oids"? > > I read the manual, but I don't understand what I earn if i use it. > > > >

Re: [SQL] Very slow search using basic pattern matching

2004-05-18 Thread Karsten Hilbert
> WHERE > da_records.DESCRIPTION_CY ~* '.*Aberystwyth*.' > OR > da_records.TITLE_CY ~* '.*Aberystwyth*.' > limit 100 > > Is there a better way of matching the string? (Must be case > insensitive) Are you sure you can't anchor the search pattern ? eg ~* '^' || lower('Aberys

[SQL] I'm baffled

2004-05-18 Thread hook
I have a couple of 'c' object files that send mail when ever there in an insert or delete to specified tables. The problem is that I get the mail message even if the insert fails! what am I doing wrong? thanks The function; create function insert_r1(text, text, text, text) returns int4

Re: [SQL] Very slow search using basic pattern matching

2004-05-18 Thread Bruno Wolff III
On Tue, May 18, 2004 at 16:47:11 +0100, Dan Field <[EMAIL PROTECTED]> wrote: > FROM > da_records > WHERE > da_records.DESCRIPTION_CY ~* '.*Aberystwyth*.' > OR > da_records.TITLE_CY ~* '.*Aberystwyth*.' > limit 100 > > Is there a better way of matching the string? (Must be case

[SQL] Very slow search using basic pattern matching

2004-05-18 Thread Dan Field
I'm trying to use the following statement as part of a search facility on a site I develop. However the search is taking in excess of 10 seconds some times to return results. I'ts a dual opteron server with a couple gigs of RAM so should be more than enough to deal with this database. SELECT da_

[SQL] Opening and Fetching from a refcursor inside a function

2004-05-18 Thread kumar
Dear Friends,   I am using Postgres 7.3.4 on Redhat linux   In one of my requirement, I am getting a cursor as input parameter.I am trying to process the records inside this cursor and i am not able to do it. (Some thing like opening and fetching a cursor in SQL Server)   My approach is as f

Re: [SQL] a wierd query

2004-05-18 Thread Stijn Vanroye
I understand, thanks. First: as I said in my previous post, the workhour_id was left behind by mistake and has since been removed. So it seems that I can ommit the distinct completely and just use the query in it's simpelest form, like this: select employee_id, begindate as date from workhour