Re: plpgsql allowing null fields in insert commands?

Поиск
Список
Период
Сортировка
От Celia McInnis
Тема Re: plpgsql allowing null fields in insert commands?
Дата
Msg-id 20050317010341.M24166@drmath.ca
обсуждение исходный текст
Ответ на Re: plpgsql allowing null fields in insert commands?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-novice
Ok - there was a column misordering in my rather complicated procedure.
The form which works to handle possibly null-valued (timestamp) values is indeed:

u:='INSERT INTO ' || mytable || ' VALUES(' ||
COALESCE(quote_literal(mytime),'NULL') || ')';

Thanks for your help. I hope to be good at this plpgsql at some point!

Celia

> Hmm, my simple tests worked, can you show the full function
> definition and the table definition of the table you're trying to
> insert into?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq


--
Open WebMail Project (http://openwebmail.org)


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: plpgsql allowing null fields in insert commands?
Следующее
От: brew@theMode.com
Дата:
Сообщение: Re: XML and Postgres