Re: insert in function writen in pgplsql

Поиск
Список
Период
Сортировка
Искать
От
Guillaume Lelarge
Тема
Re: insert in function writen in pgplsql
Дата
Msg-id
4BA38ED3.6070109@lelarge.info
Ответ на
Список
Дерево обсуждения
insert in function writen in pgplsql Julius Tuskenis <julius@nsoft.lt>
Re: insert in function writen in pgplsql Anibal David Acosta <anibal.acosta@edge.com.py>
Re: insert in function writen in pgplsql Guillaume Lelarge <guillaume@lelarge.info>
Re: insert in function writen in pgplsql Julius Tuskenis <julius@nsoft.lt>
Re: insert in function writen in pgplsql Guillaume Lelarge <guillaume@lelarge.info>
Re: insert in function writen in pgplsql Szymon Guz <mabewlun@gmail.com>
Re: insert in function writen in pgplsql Tom Lane <tgl@sss.pgh.pa.us>
Re: insert in function writen in pgplsql Szymon Guz <mabewlun@gmail.com>
Re: insert in function writen in pgplsql Bruce Momjian <bruce@momjian.us>
Le 19/03/2010 15:39, Julius Tuskenis a écrit :
> 2010.03.19 16:20, Guillaume Lelarge rašė:
>> Yes. It would also be easier to debug.
>>    
> I guess so, but is there no way to tell the postgres that I'm listing
> the field names and there is no place for a parameter in that list... I
> tried using INSERT INTO table(table.column .... syntax, but postgres
> does not accept that.

No, there's no way.

> When you write a new function it is not hard to pick the parameter names
> you want, but when editing it you have to play with what you have and
> sometimes it's a pain....
> 

I always add prefix to work around this (p_user for example).

> One more question Is there a way to use INSERT INTO table($1....
> syntax?? I can't think of such case. Can you provide an example?
> 

You'll find examples and explanations in the fine manual:


http://www.postgresql.org/docs/8.4/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com
В списке pgsql-admin по дате отправления
От: Julius Tuskenis
Дата:
От: Szymon Guz
Дата:
FAQ