Re: ECPG bug: "unterminated quoted identifier"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ECPG bug: "unterminated quoted identifier"
Дата
Msg-id 694247.1603242764@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ECPG bug: "unterminated quoted identifier"  (1250kv <1250kv@gmail.com>)
Ответы Re: ECPG bug: "unterminated quoted identifier"  (1250kv <1250kv@gmail.com>)
Список pgsql-bugs
1250kv <1250kv@gmail.com> writes:
> I have come across cases in which there is a need to use nested double
> quotes inside C string literal.

>   EXEC SQL EXECUTE IMMEDIATE "DO $$\n\
>   BEGIN\n\
>     :i := embeddedc.\"My_Func\"(:i);\n\
>   END\n\
>   $$";

I'd be interested to understand why you feel the need to write that,
and not just

 EXEC SQL DO $$
  BEGIN
    :i := embeddedc."My_Func"(:i);
  END
  $$;

AFAICS, EXECUTE IMMEDIATE with a constant string isn't really useful
for anything.  (Note that if you mean those :i's as references to
your ECPG variable, I don't think that works in either syntax, since
it's inside a literal.)

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Incorrect rounding of double values at max precision