| От | Jason Earl |
|---|---|
| Тема | Re: Inserting values into numeric fields |
| Дата | |
| Msg-id | 87y9ft23cg.fsf@npa01zz001.simplot.com обсуждение исходный текст |
| Ответ на | Inserting values into numeric fields ("Eric Carpenter" <postgresql@slacker.to>) |
| Список | pgsql-sql |
"Eric Carpenter" <postgresql@slacker.to> writes: > Greetings all, > > I'm trying to insert values into a numeric field which may be > optional. I'm using perl's DBI and bind parameters to do > this. However, psotgresql complains that '' is not a numeric, since > the DBI quotes everything before inserting.. I've tried inserting > NULL as well, but that gets quoted and rejected as well. > > Is there any way to do this without hard coding "NULL" into the > prepared statement handle? It's been a long time since I used Perl with PostgreSQL but it seems DBI will insert null values if you pass them variables that are undefined. Try using undef() and see what you get. Good luck, Jason
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера