Function Doubt

Поиск
Список
Период
Сортировка
От Wilton
Тема Function Doubt
Дата
Msg-id 41F9259A.2080402@microwork.inf.br
обсуждение исходный текст
Ответы Re: Function Doubt  (Richard Huxton <dev@archonet.com>)
Список pgsql-sql
Inside a function of trigger type, i have:

Declare   qCampos record;   StrCampo string;   StrInsert string;
Begin
   StrCampo = '''';   StrInsert = '''';
   For qCampos in select pga.attname from pg_class pgc, pg_attribute pga                  where pgc.relname = '''' ||
tg_relname|| '''' and                  pgc.oid = pga.attrelid and pga.attnum > 0 and                  attisdropped <>
''t''Loop
 
      StrCampo = ''new.'' || qCampos.attname;      StrInsert = StrInsert || virgula || StrCampo || '' - '';   End
Loop;
   Return new;
End;

What i need to do for the variable StrCampo returns to me "SP", "RJ", i 
mean, return a value inserted into the field.
I do not want to use static command new.campo1, new.campo2....

Thanks,

Wilton Ruffato Wonrath



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.6 - Release Date: 27/1/2005



В списке pgsql-sql по дате отправления:

Предыдущее
От: KÖPFERL Robert
Дата:
Сообщение: Re: What's the equivalent in PL/pgSQL
Следующее
От: "Joel Fradkin"
Дата:
Сообщение: hardware mod based on feedback from the list