trouble writing plpgsql

Поиск
Список
Период
Сортировка
От hamann.w@t-online.de
Тема trouble writing plpgsql
Дата
Msg-id wolfgang-1221222123722.A0128333@linux-tuxedo
обсуждение исходный текст
Ответы Re: trouble writing plpgsql  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-general

Hi,

I want to make a function to parsetext and return key-value pairs
create or replace function extractinfo (text) returns table (key char[1], val text) 
language plpgsql as $$

I first tried
declare
xx record;
begin
....
xx.key = ....; xx.val = ....;
return next xx:

This is not possible because xx needs to know its structure before the fields can be assiged to.
Could I declare xx as having these fields in the first place, do Ineedto create a type for key, val
first?

Wolfgang Hamann 




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

Предыдущее
От: Rainer Duffner
Дата:
Сообщение: Re: Regd. the Implementation of Wallet (in Oracle) config equivalent in postgreSQL whilst the database migration
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: trouble writing plpgsql