[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] create table sintax
From:       Richard Gomes <rgomes1997 () yahoo ! co ! uk>
Date:       2011-04-26 10:54:44
Message-ID: 4DB6A474.4020709 () yahoo ! co ! uk
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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
> > postgis-users@postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <font face="sans-serif">Julio,<br>
      <br>
      You can always create constraints by hand if they are not created
      automagically when you create a table based on some other existing
      table.<br>
      <br>
      I hope it helps.<br>
      <br>
      Cheers :)<br>
      <br>
    </font>
    <pre class="moz-signature" cols="72">Richard Gomes
<a class="moz-txt-link-freetext" \
href="http://www.jquantlib.org/index.php/User:RichardGomes">http://www.jquantlib.org/index.php/User:RichardGomes</a>
                
twitter: frgomes

JQuantLib is a library for Quantitative Finance written in Java.
<a class="moz-txt-link-freetext" \
                href="http://www.jquantlib.com/">http://www.jquantlib.com/</a>
twitter: jquantlib
</pre>
    <br>
    On 19/04/11 13:21, Ben Madin wrote:
    <blockquote
      cite="mid:D48479F3-242F-47B7-AEA9-C3B47318D8BF@remoteinformation.com.au"
      type="cite">
      <pre wrap="">J&uacute;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&uacute;lio Almeida wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">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
<a class="moz-txt-link-abbreviated" \
href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
 <a class="moz-txt-link-freetext" \
href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
 </pre>
      </blockquote>
      <pre wrap="">
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
 <a class="moz-txt-link-freetext" \
href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>


</pre>
    </blockquote>
  </body>
</html>



_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic