Re: [SQL] Syntax Error in COPY when “create function”

2007-02-27 Thread Tom Lane
Osvaldo Rosario Kussama <[EMAIL PROTECTED]> writes: >> |Does this mean the "filename" in COPY command can not be a variable?| Got it in one. You can use EXECUTE to put together commands that require a variable in places where PG doesn't allow one. regards, tom lane -

Re: [SQL] Syntax Error in COPY when “create function”

2007-02-27 Thread Osvaldo Rosario Kussama
hongliu zou escreveu: Am I forgetting some limitation? I get " ERROR: syntax error at or near "$1" SQL state: 42601 "with this CREATE FUNCTION Import1() RETURNS text AS $$ DECLARE path Char(100); BEGIN path = 'C:/zhl/hjs/anc_area.att'; COPY anc_areaAtt FRO

[SQL] Syntax Error in COPY when “create function”

2007-02-26 Thread hongliu zou
Am I forgetting some limitation? I get " ERROR: syntax error at or near "$1" SQL state: 42601 "with this CREATE FUNCTION Import1() RETURNS text AS $$ DECLARE path Char(100); BEGIN path = 'C:/zhl/hjs/anc_area.att'; COPY anc_areaAtt FROM path CVS;