We exhibit a coordinate-based language, called PFOL, which is sound for the linear queries computable in first-order logic over the reals and extends the latter''s restriction to linear arithmetic. To evaluate its expressive power, we first consider PFOL-finite, the PFOL programs that compute finite outputs upon finite inputs. In order to study this fragment of PFOL, we also define an equivalent syntactical language, called SPFOL. We show that SPFOL has the same expressive power as SafeEuql (S. Cluet, R. Hull (Eds.), Proceedings of the Sixth International Workshop on Database Programming Languages, Lecture Notes in Computer Science, Vol. 1369, Springer, Berlin, 1997, pp. 1–24), whence all ruler-and-compass constructions in the plane on finite sets of points can be expressed in SPFOL. This result gives a geometrical justification of SPFOL, and, hence, also of PFOL-finite. Then, we define finite representations for arbitrary semi-linear sets and show that there are PFOL programs for both the encoding and the decoding. This result is used (i) to identify a broad, natural class of FO+poly-expressible linear queries of which we show equivalence with the class of PFOL-expressible queries, and (ii) to establish a general theorem about lifting query languages on finite databases to query languages on arbitrary linear databases. This theorem is applied to a recent result of Benedikt and Libkin (SIAM J. Comput. 29 (2000) 1652–1682) from finite to arbitrary semi-linear sets, yielding the existence of a natural, syntactically definable fragment of FO+poly sound and complete for all FO+poly-expressible linear queries. [Copyright &y& Elsevier]