Re: Create view is not accepting the parameter in postgres functions

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Create view is not accepting the parameter in postgres functions
Дата
Msg-id 158613BD-80F0-4116-A71A-C03EEC00279A@gmail.com
обсуждение исходный текст
Ответ на Create view is not accepting the parameter in postgres functions  ("Divyaprakash Y" <divyaprakash.y@celstream.com>)
Ответы Re: Create view is not accepting the parameter in postgres functions  (Craig Ringer <ringerc@ringerc.id.au>)
Re: Create view is not accepting the parameter in postgres functions  (Chris Travers <chris.travers@gmail.com>)
Список pgsql-general
On 13 Jun 2012, at 7:31, Divyaprakash Y wrote:

> Hi,
>
> Is the following postgres function correct?
>
> CREATE OR REPLACE FUNCTION "MyFun"("IdArgs" INTEGER)

Named parameters --------------------^^^


>                CREATE VIEW "A"  AS SELECT * FROM "B" WHERE "Id" = $1;


Positional parameters ---------------------------------------------^^

You can't mix those. I don't think SQL functions support named parameters, so using positional parameters throughout
wouldbe the solution. 

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.


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

Предыдущее
От: yatler sahri
Дата:
Сообщение: Getting this error
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Create view is not accepting the parameter in postgres functions