I think I've ran into this too..
The problem was with text timezone not being recognized by Postgres.
Here's what I've done:
CREATE OR REPLACE FUNCTION mychg_tz (VARCHAR) RETURNS TEXT AS '
DECLARE
date_tz ALIAS FOR $1;
BEGIN
return translate(date_tz,''<NAS_TZ>'',''<SQL_TZ>'');
END;
' LANGUAGE 'plpgsql';
NAS_TZ = NAS timezone text (not recognized by Postgres)
SQL_TZ = equivalent timezone text recognized by Postgres
then every time that a date is supposed to be inserted into the db, call
the function:
i.e.
strip_dot(mychg_tz('%{h323-disconnect-time}'))
HTH,
ROY
On Thu, 2004-03-11 at 23:20, Costin Manda wrote:
> I am trying to use freeradius with a Cisco VoIP gateway to auth and acc
> prepaid cards. This is what I did:
>
> Installed the following:
> - Perl 5.8.3
> - PostgreSQL 7.4.2 (with perl)
> - Freeradius 0.9.3
>
> I followed the instructions from postgres/src/billing concerning using
> freeradius with prepaid cards. After I started everything, this happened:
>
> I got errors like "there is no 'Start' relation in the database".
> Same for 'Stop'. For that I changed the pgsql-voip.conf to point to
> StartVoip
> and StopVoip.
>
> Then I got an error that plpgsql is not permitted language. In README it
> said to createlang radius plperl. Anyway, I looked in the sql file that is
> supplied with freeradius and saw that the function there ( strip_dot() ) was
> in plpgsql and
> so I createlang'ed plpgsql for the radius database.
>
> Then I got an error that said that h323gwid is not a column in StopVoip. I
> added that collumn.
>
> But now, I get errors I can't understand. I need your help with it, as I
> am not used to either Perl, PostgreSQL or RADIUS.
> errors:
> ===========
> Error: rlm_sql (sql): Couldn't update SQL accounting for START packet -
> ERROR: invalid input syntax for type timestamp with time zone: "" CONTEXT:
> PL/pgSQL function "strip_dot" while casting return value to function's
> return type
>
> Error: rlm_sql (sql): Couldn't update SQL accounting STOP record - ERROR:
> invalid input syntax for type boolean: ""
> ===========
>
> Please, someone help?!
>
> Thanks,
> Costin
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html