[postgis-users] data extract

George Pavlov gpavlov at mynewplace.com
Mon Nov 12 23:27:10 PST 2007


select *
from your_table
where unique_id in (
  select max(unique_id)
  from your_table
  group by structure_type
);


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Andre Schoonbee
> Sent: Monday, November 12, 2007 11:20 PM
> To: 'PostGIS Users Discussion'
> Subject: [postgis-users] data extract
> Importance: High
> 
> I have various tables in my POSTGIS database. Each table 
> contains a type field (column) that define the type of 
> structure, such as the type of road eg. I want to extract a 
> few sample data from each table, but should contain at least 
> one of each type so that a developer can test this data 
> against a mapserver mapfile. I do not want to dump the entire 
> database (to big).That should the sql command looks like
> 
>  
> 
> Regards
> 
>  
> 
> Andre
> 
>  
> 
> ________________________________
> 
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Zedler, Doug
> Sent: Wednesday, October 03, 2007 5:03 PM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] Installation Error
> 
>  
> 
> I'm trying to install PostgreSQL and PostGIS to play with it 
> and learn about it.  I installed PostgreSQL 8.2.4 just fine.  
> I am able to connect using pgAdmin III and such.  When I run 
> the PostGIS 1.3.1 installation executable, I get the following error:
> 
>  
> 
> createdb: could not connect to database postgres: FATAL:  
> password authentication failed for user "postgres"
> 
>  
> 
> I am able to connect to the postgres database using pgAdmin 
> III under the postgres role using the same password I'm 
> putting into the installation wizard, and I'm not mixing up 
> the password for the database role with the password for the 
> local account on my machine.  Any suggestions are appreciated.
> 
>  
> 
> Thanks,
> 
>  
> 
> Douglas B. Zedler
> 
> IT Programmer/Analyst
> 
> Fort Worth Fire Department
> 
> 817.392.8463
> 
>  
> 
> 



More information about the postgis-users mailing list