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

Deep quotation

From: Casey Allen Shobe <cshobe(at)secureworks(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Deep quotation
Date: 2002-09-15 11:55:22
Message-ID: 200209150755.22742.cshobe@secureworks.net (view raw or flat)
Thread:
Lists: pgsql-novice
I can't seem to get the quoting around "Customers" right in the statement 
below.  In db2, I can use \' to escape the quote, and it will insert into the 
database properly.  How do I insert single quote data into a table using 
single-quote data containers?

insert into	"permissions" (
	"component_id", "action", "query"
) values (
	'home',
	'allow_message_entry',
	'select		count(*)
from only	"users" as "u"
inner join only	"positions" as "p"
on		p."position_id" = u."Position ID"
where		u."UID" = 100
and		p."acl" >= 50
and		p."group_id" != (
	select		g."grosysid"
	from only	"pg_group" as "g"
	where		g."groname" = 'Customers'
)'

Thanks,

-- 
Casey Allen Shobe / Network Security Analyst & PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
cshobe(at)secureworks(dot)net / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

Lost Terminal.

Responses

pgsql-novice by date

Next:From: Casey Allen ShobeDate: 2002-09-15 12:32:57
Subject: RESOLVED: Deep quotation
Previous:From: Casey Allen ShobeDate: 2002-09-15 10:14:33
Subject: Referencing system relations?

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