Re: [SQL] colored PL with emacs

2004-08-31 Thread Manuel Sugawara
Martin Marques <[EMAIL PROTECTED]> writes: > I have SQL highlighting, but what I want are colors for the PL/pgSQL > key words. It would make PL programming much easier. Since the Pl/PgSQL code is quoted (x)emacs paints the whole thing using the string face. Delete one of the apostrophes delimitin

Re: [SQL] trigger function building

2004-05-26 Thread Manuel Sugawara
hook <[EMAIL PROTECTED]> writes: > What's the proper way to include the suport files for building 'C' trigger > functions in to the normal PostgreSQL install? > > > I.E. / > "make install "does not include internal/postgres_fe.h, executor/spi.h > nor commands/trigger.h in to /usr/local/pgsql

Re: [SQL] Preventing Deletions with triggers

2004-05-21 Thread Manuel Sugawara
Jeff Post <[EMAIL PROTECTED]> writes: > Here is what I got: > > CREATE or replace FUNCTION person_fake_delete() RETURNS TRIGGER AS ' > BEGIN > OLD.status := 1; -- This does the fake deletion > RETURN NULL; -- I thought this would prevent the delete from > actually happenin

Re: [SQL] Simple view confuses PostgreSQL query planning

2004-05-20 Thread Manuel Sugawara
Tom Lane <[EMAIL PROTECTED]> writes: > Get rid of the CASEs (perhaps you could wrap them into functions > declared STRICT) and the view would be flattenable. Will do that. Thanks. Regards, Manuel. ---(end of broadcast)--- TIP 3: if posting/reading

[SQL] Simple view confuses PostgreSQL query planning

2004-05-20 Thread Manuel Sugawara
[I sent this message two months ago and got no answer. I'm resending now hoping to get some feedback.] Hi, I'm facing a wired problem. When I left join two tables PostgreSQL is able to do it fast using the corresponding indices, However, if I define a simple view (to format the data) on one of th

[SQL] left join on a view takes significantly more time.

2004-03-31 Thread Manuel Sugawara
Hi, I'm facing a wired problem. When I left join two tables PostgreSQL is able to do it fast using the corresponding indices, However, if I define a simple view (to format the data) on one of the tables, the left join does not use the indices. Is something wrong here? The two tables: ***

Re: [SQL] select by groups

2004-03-01 Thread Manuel Sugawara
Martin Marques <[EMAIL PROTECTED]> writes: > I have a table with names of people, email address, etc, and an identifier > that tells me which group they are in (could be a 1, 2, or 3 person group). > Is it posible to make a query that would give me the name of the persons of > each group in one

Re: [SQL] Regular expression problem

2003-10-24 Thread Manuel Sugawara
"scott.marlowe" <[EMAIL PROTECTED]> writes: > It certainly seems to work in Postgresql 7.4 beta 4: > > create table test2 (info text); > CREATE TABLE > insert into test2 values ('ab'); > INSERT 109169538 1 > insert into test2 values ('abc'); > INSERT 109169539 1 > > marl8412=# select * from test

Re: [SQL] Regular expression problem

2003-10-24 Thread Manuel Sugawara
Matias Surdi <[EMAIL PROTECTED]> writes: > Manuel Sugawara wrote: > >Use something like '^[a-z]{2}$' > > so, is this a bug No it is not. The sintax you are using is not supported. Regards, Manuel. ---(end of broadcast)--

Re: [SQL] Regular expression problem

2003-10-23 Thread Manuel Sugawara
Matias Surdi <[EMAIL PROTECTED]> writes: > Hi... I'm dealing with a regular expression in a check constraint for many > days i'm stuck with this... > > what I'm doing is adding a check to an existing table on a field called > codigoex1 (varchar(9) ) > > check (codigoex1 ~* '[a-z]{2,2}') > >

Re: [SQL] RFC: i18n2ascii(TEXT) stored procedure

2003-09-25 Thread Manuel Sugawara
Michael A Nachbaur <[EMAIL PROTECTED]> writes: > b) is there a better and/or faster way of implementing this? I > don't want searches to bog down (at least too badly) as a result of > this. Use to_ascii(text), masm=# select to_ascii('áéíóú'); to_ascii -- aeiou (1 row) Regards, Manuel

Re: [SQL] psql on FreeBSD 4.7-RELEASE-p2 and greek (iso8859-7) chars

2002-11-21 Thread Manuel Sugawara
Achilleus Mantzios <[EMAIL PROTECTED]> writes: > Hi, > > I noticed that psql on FreeBSD (i checked also fbsd 4.5 with pgsql port > installed) > does not accept 8bit iso8859-* chars > 128 (where the greek chars are). > > In linux that works ok, and i can update/insert/select values > using greek

[SQL] left join query does not perform well

2002-08-24 Thread Manuel Sugawara
Hi all, I have three tables that are related in the following way: ' | epr_ord_grupo < 1 - n > epr_ord_profesor < 0 - n > epr_ord_horario ` In average there is 1.0407716514 rows in epr_ord_horario for each row in e

Re: [SQL] SQL Date Challenge

2001-06-04 Thread Manuel Sugawara
"Josh Berkus" <[EMAIL PROTECTED]> writes: > > SELECT ALL Wednesdays BETWEEN 5/1/01 AND 6/1/01; > somthing like: select date from xx where to_char(date,'fmdy') = 'wed'; hth, Manuel. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe comm