Balazs,

Well, can a default value be NULL?  Would it be possible to say something like
${lat:-NULL}

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.


Liam


Balazs Scheidler wrote:
On Sun, 2009-03-15 at 14:40 -0700, Liam Kirsher wrote:
  
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.
    

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?

  

-- 
Liam Kirsher
PGP: http://liam.numenet.com/pgp/