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: (view raw, whole thread or download thread mbox)
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 (
	'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'


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

Lost Terminal.


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-2017 The PostgreSQL Global Development Group