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

  • Home
  • SEARCH
  • 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 8170145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:04:34+00:00 2026-06-06T21:04:34+00:00

I have the following table defined at postgresql: Column | Type | Modifiers —————–+————————+———–

  • 0



I have the following table defined at postgresql:

        Column      |          Type          | Modifiers 
-----------------+------------------------+-----------
 id              | uuid                   | not null
 entity_snapshot | text                   | 
Indexes:
    "pk_id" PRIMARY KEY, btree (id)

I would like to store the following JSon string:

[ "org.test.MyUniqueId", {:   "uuid" : "f4b40050-9716-4346-bf84-8325fadd9876": } ]

for some testing, instead of doing this using Jackson, I try to type an SQL manually, and here is my problem – I can’t seem to get ti right.

My current attempt is:

insert into my_table(id,entity_snapshot) values ('d11d944e-6e78-11e1-aae1-52540015fc3f','[ \"org.test.MyUniqueId\", {:   \"uuid\" : \"f4b40050-9716-4346-bf84-8325fadd9876\": } ]');

Procuedure a record that looks like what I need when I select from the table, but when I try to use Jackson to parse it I get an error –

org.apache.commons.lang.SerializationException: org.codehaus.jackson.JsonParseException: Unexpected character (':' (code 58)): was expecting double-quote to start field name

Needless to say that if the same record is inserted via my java code , I can get it parsed and when it comes to looking at the record with human eyes, it looks the same to me.

Can you tell me where I am wrong in my SQL insert statement?

  • 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-06T21:04:35+00:00Added an answer on June 6, 2026 at 9:04 pm

    Double quotes inside single quotes do not need any escaping.

    insert into my_table (id,entity_snapshot)
    values 
    (
       'd11d944e-6e78-11e1-aae1-52540015fc3f',
       '["org.test.MyUniqueId", {: "uuid" : "f4b40050-9716-4346-bf84-8325fadd9876": }]'
    );
    

    will work just fine:

    postgres=> create table my_table (id uuid, entity_snapshot text);
    CREATE TABLE
    Time: 34,936 ms
    postgres=> insert into my_table (id,entity_snapshot)
    postgres-> values
    postgres-> (
    postgres(>    'd11d944e-6e78-11e1-aae1-52540015fc3f',
    postgres(>    '["org.test.MyUniqueId", {: "uuid" : "f4b40050-9716-4346-bf84-8325fadd9876": }]'
    postgres(> );
    INSERT 0 1
    Time: 18,255 ms
    postgres=>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following table EVENT_LOG : EVENT_ID: pk, int, not null TYPEID: fk,
I have a column in a PostgreSql database that is defined with type boolean[]
I have a column in a table defined as following in my yaml file:
Imagine to have a table defined as CREATE TABLE [dbo].[Price]( [ID] [int] NOT NULL,
let's say I have a column on my table defined the following: MyColumn smallint
Is there a way to add a not null type column to a Postgresql
I have a table defined by the following SQL: CREATE TABLE test ( id
I have the following table: UID | Limit |Type 8 | 4 |A 8
newbie question in css: I have the following style defined: TABLE.tabulardata th { font:
I have following mysql table: Item Name Listing Fee Listing Type watch $0.20 LISTED

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.