Re: [SQL] Case Insensitive searches

2008-08-06 Thread Rafael Domiciano
I have read the article... tnks, very helpful. But, can I create a index using function like "substring"? I would like to create something like this: CREATE INDEX indtest_01 ON table_01 ((SUBSTRING(month_year, 3, 4) || SUBSTRING(month_year, 1, 2)) 2008/8/4 Terry Lee Tucker <[EMAIL PROTECTED]> >

Re: [SQL] Case Insensitive searches

2008-08-06 Thread Terry Lee Tucker
On Wednesday 06 August 2008 07:59, Rafael Domiciano wrote: > I have read the article... tnks, very helpful. > > But, can I create a index using function like "substring"? I would like to > create something like this: Actually, Richard Broersma is the one who commented on that approach. I have nev

Re: [SQL] more than 1000 connections

2008-08-06 Thread Mark Roberts
On Wed, 2008-08-06 at 08:06 +0800, Craig Ringer wrote: > Out of interest - why 1000 connections? > > Do you really expect to have 1000 jobs concurrently active and doing > work? If you don't, then you'll be wasting resources and slowing > things > down for no reason. There is a connection overhea

Re: [SQL] more than 1000 connections

2008-08-06 Thread Jorge Medina
On Wed, Aug 6, 2008 at 11:54 AM, Mark Roberts <[EMAIL PROTECTED]> wrote: > > On Wed, 2008-08-06 at 08:06 +0800, Craig Ringer wrote: >> Out of interest - why 1000 connections? >> >> Do you really expect to have 1000 jobs concurrently active and doing >> work? If you don't, then you'll be wasting res

Re: [SQL] more than 1000 connections

2008-08-06 Thread Scott Marlowe
On Wed, Aug 6, 2008 at 10:42 AM, Jorge Medina <[EMAIL PROTECTED]> wrote: >> > I have many trouble's with server, because my webmail(roundcube) works > with the db and the machine only have 2G of RAM but collapse with 60 > concurrent connections, I try with persistent connections and the same > prob

[SQL] How to creat tables using record ID in for loop

2008-08-06 Thread CHUNRIMACHUNRIMA
1. I have created the first table and inserted records as below CREATE TABLE mytest ( staid varchar(20), kdesc varchar(50) -- description of gage station ) WITHOUT OIDS; INSERT INTO mytest VALUES ('96784002', 'mylocation #1'); INSERT INTO mytest VALUES ('02385067'

Re: [SQL] more than 1000 connections

2008-08-06 Thread Jorge Medina
On Wed, Aug 6, 2008 at 1:38 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote: > On Wed, Aug 6, 2008 at 11:29 AM, Jorge Medina <[EMAIL PROTECTED]> wrote: >> On Wed, Aug 6, 2008 at 12:47 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote: >>> On Wed, Aug 6, 2008 at 10:42 AM, Jorge Medina <[EMAIL PROTECTED]> wrot

Re: [SQL] more than 1000 connections

2008-08-06 Thread Scott Marlowe
On Wed, Aug 6, 2008 at 1:34 PM, Jorge Medina <[EMAIL PROTECTED]> wrote: > On Wed, Aug 6, 2008 at 1:38 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote: >> On Wed, Aug 6, 2008 at 11:29 AM, Jorge Medina <[EMAIL PROTECTED]> wrote: >>> On Wed, Aug 6, 2008 at 12:47 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote

Re: [SQL] Single Quote in tsquery

2008-08-06 Thread Alvaro Herrera
Ryan Wallace wrote: > I am trying to perform a full text search for the word 'ksan (which > starts with a quote). After much frustration and syntax errors I > stumbled upon the following statement which seems to work: > > select * > from items > where to_tsvector(name) @@ to_tsquery(E'[\']ksan')

Re: [SQL] How to creat tables using record ID in for loop

2008-08-06 Thread Ragnar
On miư, 2008-08-06 at 18:52 +, CHUNRIMACHUNRIMA wrote: > "96784002";"mylocation #1" > "02385067";"mylocation #2" > "01734056";"mylocation #3" ... > 3. What I want to do is to create tables with staid from mytest table > using for loop. ... > +++Example+++ > > CREATE TABLE s06784000 ( > st

Re: [SQL] more than 1000 connections

2008-08-06 Thread Craig Ringer
Jorge Medina wrote: > I have many trouble's with server, because my webmail(roundcube) works > with the db and the machine only have 2G of RAM 2GB of RAM can go a long way. It looks like this webmail app is sensible enough to use IMAP for mail store access, so you don't have to worry about message

Re: [SQL] How to creat tables using record ID in for loop

2008-08-06 Thread Yura Gal
The function to treate tables is: CREATE OR REPLACE FUNCTION cr_tbls_by_staid() RETURNS INTEGER AS $$ DECLARE stid INTEGER; q TEXT; BEGIN FOR stid IN SELECT staid FROM mytest LOOP q:= 'CREATE TABLE "s' || staid || '" (staid varchar(50), val real, dt date);' RAISE NOTICE 'query is: %'