<div dir="ltr"><div>I was thinking about this way to do it, but my app has many users, and in case two rasters with the same filename are loaded, there would be a problem using filename to create a foreign key. The aim of the foreign key here would be to specify which user is the owner of which raster. <br>
<br></div>I suppose I could find a way to handle the possibility of two rasters with the same filename, but if I could create the foreign key during the import, I think that would be the best.<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, May 14, 2014 at 11:08 AM, Jason Mathis <span dir="ltr"><<a href="mailto:jmathis@redzonesoftware.com" target="_blank">jmathis@redzonesoftware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">That what I was thinking too. Just to clarify its a capital “-F”. </div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Its a handy option for post processing the files in the db. </div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><a href="http://postgis.net/docs/using_raster_dataman.html#RT_Raster_Loader" target="_blank">http://postgis.net/docs/using_raster_dataman.html#RT_Raster_Loader</a></div>
<div><div class="h5"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br></div><p style="color:#000">On May 14, 2014 at 9:04:32 AM, Pierre Racine (<a href="mailto:pierre.racine@sbf.ulaval.ca" target="_blank">pierre.racine@sbf.ulaval.ca</a>) wrote:</p> <blockquote type="cite"><span><div><div>
</div><div>You can add the filename as a new column with the -f option. Then you can extract whatever you want from this column to build a key.
<br>
<br>Does this works for you?
<br>
<br>Pierre
<br>
<br>> -----Original Message-----
<br>> From: <a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:postgis-users-" target="_blank">postgis-users-</a>
<br>> <a href="mailto:bounces@lists.osgeo.org" target="_blank">bounces@lists.osgeo.org</a>] On Behalf Of Max Demars
<br>> Sent: Wednesday, May 14, 2014 10:08 AM
<br>> To: <a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>
<br>> Subject: [postgis-users] add foreign-key constraint on raster import
<br>>  
<br>> Hi,
<br>>  
<br>>  
<br>> I want to import many rasters from files into a same tablewith a foreign-key
<br>> constraint to be able to query them individually or grouped as needed.
<br>>  
<br>>  
<br>> I was hopping that the raster2pgsql tool would be able to do it, but no
<br>> chance.
<br>>  
<br>>  Is there a way to ask raster2pgsql to add a foreign-key during import? If
<br>> not, what would be the best approach for this purpose?
<br>>  
<br>> Thank you very much,
<br>>  
<br>>  
<br>> -Max Demars
<br>>  
<br>>  
<br>> --
<br>>  
<br>> Stack Overflow: <a href="http://stackoverflow.com/users/1914034/burton449" target="_blank">http://stackoverflow.com/users/1914034/burton449</a>
<br>>  
<br>> GIS Overflow: <a href="http://gis.stackexchange.com/users/14426/burton449" target="_blank">http://gis.stackexchange.com/users/14426/burton449</a>
<br>>  
<br>> LastFm: <a href="http://www.lastfm.fr/user/burton449" target="_blank">http://www.lastfm.fr/user/burton449</a>
<br>
<br>_______________________________________________
<br>postgis-users mailing list
<br><a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>
<br><a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a>
<br></div></div></span></blockquote></div></div></div>
<br>


<p><font face="Arial">This transmission contains confidential and privileged
information intended solely for the party identified above. If you receive this message in error, you must not use
it or convey it to others. Please destroy it immediately and contact the sender at
<a href="tel:%28303%29%20386-3955" value="+13033863955" target="_blank">(303) 386-3955</a> or by return e-mail to the sender.</font></p>

<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">
<div><div><div>Stack Overflow: <a href="http://stackoverflow.com/users/1914034/burton449" target="_blank">http://stackoverflow.com/users/1914034/burton449</a><br></div></div>GIS Overflow: <a href="http://gis.stackexchange.com/users/14426/burton449" target="_blank">http://gis.stackexchange.com/users/14426/burton449</a><br>
</div>LastFm: <a href="http://www.lastfm.fr/user/burton449" target="_blank">http://www.lastfm.fr/user/burton449</a><br></div>
</div>