Julio,

You can always create constraints by hand if they are not created automagically when you create a table based on some other existing table.

I hope it helps.

Cheers :)

Richard Gomes
http://www.jquantlib.org/index.php/User:RichardGomes
twitter: frgomes

JQuantLib is a library for Quantitative Finance written in Java.
http://www.jquantlib.com/
twitter: jquantlib


On 19/04/11 13:21, Ben Madin wrote:
Júlio,

The problem is probably not a postgis problem (although the constraints may be 
geometry type related), but a postgres procedural language problem.

However, you haven't provided much information, no example, and you have just 
kept re-posting it. Even changing the email subject didn't really help much. I 
would suggest that you provide a better example of what is going wrong for you, 
rather than leaving it to the imagination of other readers. (Although many of 
those who do work this list are miracle workers when it comes to providing 
answers, I'm not!)

Sorry if this sounds a bit abrupt, but normally in mailing lists if you haven't 
received a reply to your question, it means no one understands the problem. 
Re-posting the same question probably won't help.

cheers

Ben


On 19/04/2011, at 4:46 PM, Júlio Almeida wrote:

Hello,

If I run

create table newtable (like oldtable including constraints);

in the SQL window with works just file.
But if i execute

execute 'create table '||newtable||' (LIKE '||oldtable||' including 
constraints)';

inside a function, in a LOOP, the constraints aren't created.
What is the problem?
Tanks,

julio almeida



_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to