Re: What am I doing wrong here?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: What am I doing wrong here?
Дата
Msg-id 17328.1577369163@sss.pgh.pa.us
обсуждение исходный текст
Ответ на What am I doing wrong here?  (stan <stanb@panix.com>)
Ответы Re: What am I doing wrong here?  (stan <stanb@panix.com>)
Список pgsql-general
stan <stanb@panix.com> writes:
> When I try to insert this function I get an error on the following line:
> _bom_name_key  = ( SELECT
> I actually pretty much get a syntax error whatever is at this line.
> Can someone please explain what I am doing wrong?

I think you're misunderstanding where to put the WITH.  That's just
part of the SQL statement as far as plpgsql is concerned, so what
you need to do to use a WITH clause in a variable assignment is
to write

    variable := WITH ... SELECT ... ;

(At least, I think that will work; what you're doing definitely
won't.)

            regards, tom lane



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

Предыдущее
От: Jayadevan M
Дата:
Сообщение: Re: What am I doing wrong here?
Следующее
От: stan
Дата:
Сообщение: Re: What am I doing wrong here?