Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9176425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:06:27+00:00 2026-06-17T17:06:27+00:00

I have postgreSQL 8.4+PostGIS 1.5. I want to generate GeoJson. I do: SELECT row_to_json(fc)

  • 0

I have postgreSQL 8.4+PostGIS 1.5.

I want to generate GeoJson. I do:

SELECT row_to_json(fc)
 FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features
 FROM (SELECT 'Feature' As type
, ST_AsGeoJSON(lg.the_geom)::json As geometry
, row_to_json(lp) As properties
   FROM parcels_temp As lg 
     INNER JOIN (SELECT num, cadastr FROM parcels_temp) As lp 
   ON lg.num = lp.num  ) As f )  As fc;

But get an error:

 ERROR:  type "json" does not exist
 LINE 4:     , ST_AsGeoJSON(lg.the_geom)::json As geometry

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:06:28+00:00Added an answer on June 17, 2026 at 5:06 pm

    There is no json data type in PostgreSQL 8.4. The type was introduced in 9.2, though a backport to 9.1 was created; see this bitbucket.

    Use text. json is just a validating wrapper around the text type anyway, the interesting bit is the functions like row_to_json – which are also unavailable for 8.4.

    If you can’t use text – say, because you’re using 3rd party code that expects json, or because you need the json functions – then it’s time to upgrade PostgreSQL. 8.4 is getting pretty elderly anyway, as is PostGIS 1.5.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have PostgreSQL+PostGIS. I java i want to call this query: SELECT num,id,mydata, asText(the_geom)
all! I have Postgresql and query SELECT complex_expression() FROM t WHERE complex_expression() != '';
I have postgresql (in perlu) function getTravelTime(integer, timestamp), which tries to select data for
I have a PostgreSQL, php5, running on Apache2.0 (on a Windows machine.) I want
I have one postgresql table where I store some stories from different sites. At
I have a postgresql (v8.4) table with login id and timestamps, and I want
I have a PostgreSQL\PostGIS spatial database which contains Hebrew text columns. The system runs
I'm using PostgreSQL + PostGIS. In table I have a point and line geometry
I am not able to make one clean SELECT I have postgresql table with
I have a PostgreSQL database with PostGIS functions loaded into it. I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.