pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
ERROR: copyObject: don't know how to copy 611 2+ messages / 2 participants [nested] [flat]
* ERROR: copyObject: don't know how to copy 611 @ 2000-11-27 10:06 Shane McEneaney <shane@shadowbox.ie> 0 siblings, 1 reply; 2+ messages in thread From: Shane McEneaney @ 2000-11-27 10:06 UTC (permalink / raw) To: pgsql-sql I get the error ERROR: copyObject: don't know how to copy 611 when I try to run the following procedure. The create table is causing the problem. CREATE FUNCTION "my_func" (int8) RETURNS int8 AS ' declare v_my_var ALIAS FOR $1; begin create table my_table(my_id int); end; ' LANGUAGE 'plpgsql'; Can anybody explain this? Thanks in advance, shane ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ERROR: copyObject: don't know how to copy 611 @ 2000-11-27 15:33 Tom Lane <tgl@sss.pgh.pa.us> parent: Shane McEneaney <shane@shadowbox.ie> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2000-11-27 15:33 UTC (permalink / raw) To: Shane McEneaney <shane@shadowbox.ie>; +Cc: pgsql-sql "Shane McEneaney" <shane@shadowbox.ie> writes: > I get the error ERROR: copyObject: don't know how to copy 611 > when I try to run the following procedure. The create table is causing > the problem. > CREATE FUNCTION "my_func" (int8) RETURNS int8 AS ' > declare > v_my_var ALIAS FOR $1; > begin > create table my_table(my_id int); > end; > ' LANGUAGE 'plpgsql'; > Can anybody explain this? CREATE TABLE, like most other utility statements, isn't supported by plpgsql at present. This is fixed for 7.1 to the extent that you can do examples like the above, but you still can't pass parameters to the things --- for example CREATE TABLE $1 (foo int) won't work. For these sorts of things you might want to consider pltcl or plperl, which don't attempt to do any pre-parsing of SQL statements. A little slower, but much more flexible... regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-11-27 15:33 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2000-11-27 10:06 ERROR: copyObject: don't know how to copy 611 Shane McEneaney <shane@shadowbox.ie> 2000-11-27 15:33 ` Re: ERROR: copyObject: don't know how to copy 611 Tom Lane <tgl@sss.pgh.pa.us>
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