I'm working on a revised patch for PREPARE/EXECUTE. The basic code has been written (although I've been delayed due to the workload at school). I'm now trying to add support for preparing queries with parameters, but it is failing at an early stage of the game:
nconway=> prepare q1 as select 1; PREPARE nconway=> prepare q2 as select $1; ERROR: Parameter '$1' is out of range (You'll see the same parse error with simply "select $1;") The shortened version of the grammar I'm using is: PrepareStmt: PREPARE name AS OptimizableStmt What modifications need to be made to allow these kinds of parametized queries? BTW, is this a legacy from postquel? (from include/nodes/primnodes.h) -------------- * Param * paramkind - specifies the kind of parameter. The possible values * for this field are specified in "params.h", and they are: * * PARAM_NAMED: The parameter has a name, i.e. something * like `$.salary' or `$.foobar'. -------------- Specifically, the "something like ..." stuff. Thanks in advance, Neil -- Neil Conway <[EMAIL PROTECTED]> PGP Key ID: DB3C29FC ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html