def METHOD_NAME(typename):
    """Returns PostGreSQL type corresponding to dlite typename."""
    if typename in pgtypes:
        return pgtypes[typename]
    else:
        t = typename.rstrip("0123456789")
        return pgtypes[t]