pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ceremona@gmail.com
To: pgsql-sql@postgresql.org
Subject: stored procs in postgresql
Date: Sat, 24 Sep 2005 12:30:58 -0700
Message-ID: <op.sxmghwnc1qrx7c@localhost> (raw)


Hi,

I have been having some trouble with plsql stored procs in postgres in  
that I can
make a table name a variable in the stored proc.  Is there some special  
way to make this happen that I am unaware of?

For example, I want to do something like:

stored_proc(integer,varchar)

SELECT table_name.id
    FROM table_name $2
   WHERE table_name.id=$1

but I get an error about the $2 argument being no good.

Does anyone know how I can deal with this?

Thanks,
Cere




view thread (4+ messages)  latest in thread

Message-ID: <op.sxmghwnc1qrx7c@localhost>
Permalink:  ../op.sxmghwnc1qrx7c@localhost/
Also on:    postgresql.org/message-id/op.sxmghwnc1qrx7c@localhost

 · 

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: ceremona@gmail.com
  Subject: Re: stored procs in postgresql
  In-Reply-To: <op.sxmghwnc1qrx7c@localhost>

* 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