pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rado Petrik <r.p@szm.sk>
To: PostgreSQL-mailinglist <pgsql-sql@postgresql.org>
Subject: What is bad in this query ?
Date: 02 May 2003 15:21:37 +0200
Message-ID: <1051881697.29275.14.camel@caj> (raw)

Hi, 

What is bad in this query ? 

SELECT CASE 
	WHEN EXIST(SELECT * FROM user WHERE name=rado) 
		THEN (INSERT INTO user VALUES('rado')) 
	END; 

PostgreSQL return 

ERROR:  parser: parse error at or near "INTO"

table user have only one column 'name' .




Thanks 
 
-- 
Rado Petrik <r.p@szm.sk>




view thread (4+ messages)  latest in thread

Message-ID: <1051881697.29275.14.camel@caj>
Permalink:  ../1051881697.29275.14.camel@caj/
Also on:    postgresql.org/message-id/1051881697.29275.14.camel@caj

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: r.p@szm.sk
  Subject: Re: What is bad in this query ?
  In-Reply-To: <1051881697.29275.14.camel@caj>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox