[GENERAL] use of Ececute commande with PSQL

Поиск
Список
Период
Сортировка
От Mourad EL HADJ MIMOUNE
Тема [GENERAL] use of Ececute commande with PSQL
Дата
Msg-id 200306091352.h59DqxQ03272@camel.cellsecure.co.za
обсуждение исходный текст
Список pgsql-patches
Hello,

I would know if it's possible to use the EXECUTE Command in PSQL as SQL
command in Pg 7.2 release.

In fact, this can make possible the dynamic query execution by using PSQL. I
tried to use PGPLSQL function that returns RECORD type without success. For
example when I create the following function :

Create function Foo (TEXT) returns RECORD As'

declare

query alias for $1;

begin

return (execute query); -- query is a sql select command (in general it's
created dynamiquelly).

end;

' language 'plpgsql';

I receive this message

NOTICE: ProcedureCreate: return type 'record' is only a shell.

the execution of this function prompts the following error:

ERROR: fmgr_info: function 0: cache lookup failed.

I think that de record type is created to contain table tuples regardless of
their structure. Is-this right? So, why we can't use it to contain any query
result?

Thanks for your help.

Mourad.



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




Вложения

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

Предыдущее
От: Ased Mustafa
Дата:
Сообщение: Ant Delete
Следующее
От: Chris Campbell
Дата:
Сообщение: Re: Adding Rendezvous support to postmaster