I installed PostgreSQL 9.6, PostGIS 2.3.1 and Pgadmin III on my computer, and I was reading the documentation, so I thought that would be a great idea see the function on practice and then modifie them to learn a little bit, but the most SQL codes that I see on documentation doesn't work if I put them on pgadmin3, for example on the page 130 in postgis's documentation (http://postgis.net/stuff/postgis-2.3.pdf) there is the following statement:

SELECT ST_MLineFromText(’MULTILINESTRING((1 2, 3 4), (4 5, 6 7))’);

When I put it on pgadmin3, I receive an error that says:

Error of sintax in or next to "2".

LINE 1: SELECT ST_MLineFromText(’MULTILINESTRING((1 2, 3 4), (4 5, 6...


********** Error **********

ERROR: error sintax in or next to "2"
SQL state: 42601
Character: 45

By the way: I'm using Debian Sid

Sorry if it's a dumb question, I'm a newbie in spatial databases.

  • Is there an output to: select postgis_full_version() ? Mar 7, 2017 at 20:30
  • yes man, there is: "POSTGIS="2.3.1 r15264" GEOS="3.5.1-CAPI-1.9.1 r4246" PROJ="Rel. 4.9.3, 15 August 2016" LIBXML="2.9.4" LIBJSON="0.12.1""
    – luminious
    Mar 7, 2017 at 20:31
  • 3
    is it an issue with smart quotes? ( vs ')
    – Paul H
    Mar 7, 2017 at 20:59
  • kkk, I tried with " before to create this topic, you're right, I'm feeling a completely idiot, what puzzle me is, why in the documentation is that way kk, thanks man.
    – luminious
    Mar 7, 2017 at 21:05
  • 2
    You should add that as the answer so this can be considered answered, @PaulH Mar 7, 2017 at 22:13

1 Answer 1


The issue is with the quote character that you used. Sometimes this happens when you type something in an application like Microsoft Word and it "fixes" your quotes from normal quote characters to smart quotes.

Smart quotes look like this

Normal quotes look like this '

So your command becomes:

SELECT ST_MLineFromText('MULTILINESTRING((1 2, 3 4), (4 5, 6 7))');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.