<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Balazs,<br>
<br>
Well, can a default value be NULL? Would it be possible to say
something like<br>
<pre wrap="">${lat:-NULL}</pre>
<br>
For lat/lng it definitely won't work, since 0/0 is a valid value -- but
probably one we don't want -- someplace out in the Atlantic Ocean.<br>
<br>
<br>
Liam<br>
<br>
<br>
Balazs Scheidler wrote:
<blockquote cite="mid:1237293822.5495.9.camel@bzorp.balabit" type="cite">
<pre wrap="">On Sun, 2009-03-15 at 14:40 -0700, Liam Kirsher wrote:
</pre>
<blockquote type="cite">
<pre wrap="">This worked fine for the timestamps, but there was a problem with other
types.
Some of the numeric fields can have null values.
It looks like syslog-ng doesn't translate empty strings into nulls when
doing the insert. Thus, the insert fails because the numeric field
types won't accept a string of any kind.
For now, I can just let them be text strings, but I'd prefer to be able
to use numeric types and allow null values. For example, in the
destination below, lat and long could be float8 and pid and art_id could
be integers.
</pre>
</blockquote>
<pre wrap=""><!---->
true enough, but you could perhaps use the "default value" feature of
macro expansion, like this:
${art_id:-0}
this means that if art_id is unset it'll expand to 0. Is this a solution
to your problem?
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Liam Kirsher
PGP: <a class="moz-txt-link-freetext" href="http://liam.numenet.com/pgp/">http://liam.numenet.com/pgp/</a>
</pre>
</body>
</html>