pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Axel Rau <Axel.Rau@Chaos1.DE>
To: pgsql-sql@postgresql.org
Subject: Using PL/pgSQL text argument in 'IN (INT,INT,...)' clause
Date: Mon, 25 Oct 2010 12:14:22 +0200
Message-ID: <BE3606F5-FE4F-4661-B6B1-36DC10488BD6@Chaos1.DE> (raw)

Good morning,

I have a function argument blah of type text containing something like
     33,44,55,66
. Can I cast it in some way to use it in an IN clause as integers like
     UPDATE foo SET x = y WHERE id IN ( blah );
or need I revert to dynamic SQL (EXECUTE...) ?

Thanks, Axel
---
axel.rau@chaos1.de  PGP-Key:29E99DD6  +49 151 2300 9283  computing @  
chaos claudius




view thread (7+ messages)  latest in thread

Message-ID: <BE3606F5-FE4F-4661-B6B1-36DC10488BD6@Chaos1.DE>
Permalink:  ../BE3606F5-FE4F-4661-B6B1-36DC10488BD6@Chaos1.DE/
Also on:    postgresql.org/message-id/BE3606F5-FE4F-4661-B6B1-36DC10488BD6@Chaos1.DE

 · 

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: Axel.Rau@Chaos1.DE
  Subject: Re: Using PL/pgSQL text argument in 'IN (INT,INT,...)' clause
  In-Reply-To: <BE3606F5-FE4F-4661-B6B1-36DC10488BD6@Chaos1.DE>

* 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