[SQL] Help needed

2005-11-30 Thread NosyMan
Hi everyone, I have some kind of strange problem. I want to build general parametrized trigger for my database. The parameter sent to the trigger contains a column name that trigger should be check. CREATE OR REPLACE FUNCTION F_T_IU__check() RETURNS trigger AS $$ DECLARE

Re: [SQL] Help needed

2005-11-30 Thread Richard Huxton
NosyMan wrote: Hi everyone, I have some kind of strange problem. I want to build general parametrized trigger for my database. The parameter sent to the trigger contains a column name that trigger should be check. The 'vt' variable contains the column name. In the above statement I want

[SQL] Archives site down?

2005-11-30 Thread Neil Saunders
Apologies if this has been mentioned on announce (I'm not subscribed), but the mailing list archive site appears to have a problem (403 Forbidden): http://archives.postgresql.org/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner

Re: [SQL] Archives site down?

2005-11-30 Thread Martín Marqués
El Mié 30 Nov 2005 09:57, Neil Saunders escribió: Apologies if this has been mentioned on announce (I'm not subscribed), but the mailing list archive site appears to have a problem (403 Forbidden): http://archives.postgresql.org/ I'm checking the archives right now, without a problem. --

Re: [SQL] problems with array

2005-11-30 Thread george young
On Sat, 15 Oct 2005 08:49:15 + paperinik 100 [EMAIL PROTECTED] threw this fish to the penguins: PostgreSQL is 7.4.7. My first table CREATE TABLE tb_cat ( id INTEGER, desc text ); INSERT INTO tb_cat VALUES (10, 'cat10'); INSERT INTO tb_cat VALUES (20, 'cat20'); INSERT INTO tb_cat

[SQL] child fk problem

2005-11-30 Thread Luis Silva
I there, I'm trying to work with postgre, but i'm having a problem with inherits. I have a table (parent) that as an fk to another table. When i create a child, i loose the connection to theother table. i dont need to insert values in the parenttable. what do i need to do?? tks in advance

[SQL] quote_literal() fails with unmatched quotes

2005-11-30 Thread James M Doherty
I have had the following problem and been unable to determine the cause ! nmostlikemat := iso_date(nmostlikemat); EXECUTE ''insert into scenario_inv ('' || ''inv_id,'' || ''record_date,'' || ''scenario_type,'' || ''mostlikemat,'' || ''mktpr,'' || ''mktyld

Re: [SQL] quote_literal() fails with unmatched quotes

2005-11-30 Thread Tom Lane
James M Doherty [EMAIL PROTECTED] writes: I have had the following problem and been unable to determine the cause ! Can you show us a complete example? I can't see what's going on from the info you've provided ... regards, tom lane ---(end of

[SQL] Quote_literal()

2005-11-30 Thread James M Doherty
declare SQL text; NSQLtext; SQL := ''10/3/2009''; NSQL := quote_literal(SQL); The result is '10/3/2009 with no closing quote. Jim James M Doherty Principal file://C:\Documents and Settings\jmd\Application Data\Microsoft\Signatures\odoherty_crest.jpg JMD CONSULTING

Re: [SQL] quote_literal() fails with unmatched quotes

2005-11-30 Thread James M Doherty
Nmostlikemat := ''10/3/2009''; What happens is that quote_literal works for everyone in the example but this one. Jim James M Doherty Principal JMD CONSULTING 411 Thunderbay Dr Georgetown, TX 78626 A reputation is something others give you HONOR is something you give yourself! -Original

Re: [SQL] child fk problem

2005-11-30 Thread Scott Marlowe
On Wed, 2005-11-30 at 12:42, Luis Silva wrote: I there, I'm trying to work with postgre, but i'm having a problem with inherits. I have a table (parent) that as an fk to another table. When i create a child, i loose the connection to the other table. i dont need to insert values in the parent

Re: [SQL] Quote_literal()

2005-11-30 Thread Tom Lane
James M Doherty [EMAIL PROTECTED] writes: declare SQL text; NSQLtext; SQL := ''10/3/2009''; NSQL := quote_literal(SQL); The result is '10/3/2009 with no closing quote. Works for me: regression=# create function foo() returns text as ' regression'# declare SQL