Revision 5897
Added by Aaron Marcuse-Kubitza about 12 years ago
schemas/vegbien.sql | ||
---|---|---|
411 | 411 |
-- Use EXECUTE to avoid caching query plan |
412 | 412 |
EXECUTE ' |
413 | 413 |
UPDATE taxonlabel SET |
414 |
matched_label_id = '||quote_literal(matched_label_id)||'
|
|
414 |
matched_label_id = '||quote_nullable(matched_label_id)||'
|
|
415 | 415 |
, matched_label_fit_fraction = ' |
416 |
||quote_literal(matched_label_fit_fraction)||'
|
|
417 |
WHERE taxonlabel_id = '||quote_literal(taxonlabel_id)||'
|
|
416 |
||quote_nullable(matched_label_fit_fraction)||'
|
|
417 |
WHERE taxonlabel_id = '||quote_nullable(taxonlabel_id)||'
|
|
418 | 418 |
'; |
419 | 419 |
|
420 | 420 |
RETURN taxonlabel_id; |
... | ... | |
432 | 432 |
BEGIN |
433 | 433 |
-- Use EXECUTE to avoid caching query plan |
434 | 434 |
EXECUTE ' |
435 |
UPDATE taxonlabel SET parent_id = '||quote_literal(parent_id)||'
|
|
436 |
WHERE taxonlabel_id = '||quote_literal(taxonlabel_id)||'
|
|
435 |
UPDATE taxonlabel SET parent_id = '||quote_nullable(parent_id)||'
|
|
436 |
WHERE taxonlabel_id = '||quote_nullable(taxonlabel_id)||'
|
|
437 | 437 |
'; |
438 | 438 |
|
439 | 439 |
RETURN taxonlabel_id; |
Also available in: Unified diff
schemas/vegbien.sql: Functions containing UPDATE statements: Use quote_nullable() instead of quote_literal() to properly encode NULL values