Skip site navigation (1) Skip section navigation (2)

How to insert apostrophied names into postgres

From: richard terry <rterry(at)gnumed(dot)net>
To: PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org>
Subject: How to insert apostrophied names into postgres
Date: 2008-02-18 23:57:08
Message-ID: 200802191057.08677.rterry@gnumed.net (view raw or flat)
Thread:
Lists: pgsql-novice
eg Peter's

if one passes the name to an sql in code it ends up looking like:

insert into whatevertable (name) values('Peter's'); 

and bombs.

Any suggestions appreciated.

Richard

Responses

pgsql-novice by date

Next:From: Phillip SmithDate: 2008-02-19 00:20:02
Subject: Re: How to insert apostrophied names into postgres
Previous:From: Mag GamDate: 2008-02-18 23:36:52
Subject: SQL question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group