Dr Eberhard W Lisse <[email protected]> writes:
> I have managed to compile PSPP with PostgreSQL support on Ubuntu 10.04
> the standard version came without it and can run simple queries, however
> when I run something like the below (shortened) it wants the whole SQL
> statement in one line, and that line must be less than 255 characters,
> which defeats the purpose:
You can use + to concatenate parts of a string and split strings
across lines, as in:
GET DATA /TYPE=PSQL
/CONNECT='host=localhost port=5432 dbname=epp '
/SQL="SELECT ip, clid, date(created) AS eppdate, " +
"CASE WHEN request ILIKE '%poll op=%' THEN 'poll' " +
"WHEN request ILIKE '%<login%' THEN 'login' " +
"WHEN request ILIKE '%<logout%' THEN 'logout' " +
"ELSE 'other' " +
"END AS epprequest " +
"FROM epp_log".
I can't think of a good reason for the 255-character limit. I
think it must be a relic from before PSPP added support for long
string values. I've pushed out a change that removes this
restriction to the "master" branch.
--
"Writing is easy.
All you do is sit in front of a typewriter and open a vein."
--Walter Smith
_______________________________________________
Pspp-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-users