Re: [SQL] PL/pgSQL syntax for strings

2001-11-03 Thread Edward Grabczewski
I've sorted this one thanks to John Berkus. Thanks guys. I've included the solution below for your interest. === DROP TABLE rtest; DROP INDEX rtest_xz_index; DROP INDEX rtest_yz_index; DROP INDEX rtest_xy_index; CREATE TABLE rtest (

Re: [SQL] PL/pgSQL syntax for strings

2001-11-01 Thread Roberto Mello
On Thu, Nov 01, 2001 at 04:48:29PM +, Edward Grabczewski wrote: > > DROP FUNCTION threedpoint (float,float,float, float,float,float); > CREATE FUNCTION threedpoint (float,float,float,float,float,float) > RETURNS text > AS 'DECLARE > x1 ALIAS FOR $1; > y1 ALIAS FOR $2; > z1 A

[SQL] PL/pgSQL syntax for strings

2001-11-01 Thread Edward Grabczewski
Could someone please tell me the correct syntax for the following problem in plpgsql: The following expression code sample works but now (for example) I'd like to subsitute the variables $1 and $2 for the numbers 0 and 2 in the following expression: INSERT INTO rtest(xz,yz,xy) VALUES ( \'(0,2),