So I took a different approach to this then looking in the hosts file in /etc; I pulled the file /etc/sysconfig/network and looked specifically for the line that contained 'HOSTNAME'.
create temp table machineNameTable (col1 text);
copy machineNameTable from '/etc/sysconfig/network';
set @machineName =
select * from machineNameTable
where col1 ilike '%HOSTNAME%';
print @machineName;
drop table machineNameTable;
which gives me back:
[PGSCRIPT ] ("HOSTNAME=SERVER_NAME")
Hope this can help someone else.