Skip site navigation (1) Skip section navigation (2)

Normalization tools for postgres?

From: Dane Springmeyer <blake(at)hailmail(dot)net>
To: Postgres General List <pgsql-general(at)postgresql(dot)org>, pgsql-php(at)postgresql(dot)org
Subject: Normalization tools for postgres?
Date: 2007-11-21 07:14:15
Message-ID: (view raw or whole thread)
Lists: pgsql-generalpgsql-php
Anyone have recommendations on tools/utilities or SQL approaches to  
quickly break apart a large imported flat file into normal forms,  
ideally 1NF or 2NF?

I noticed this tool for mySQL which captures what I am looking for:

Given the fields with data to be output into separate tables, it  
takes a csv and automatically generates a set of INSERT queries to  
build all the related tables with new a new primary key for the main  
table and serialized codes for each of the new tables to maintain  

Perhaps a customized php script could accomplish the same thing for  

Any suggestions would be helpful.


  field names for which to break out into their own tables
On Nov 20, 2007, at 8:33 PM, Richard Broersma Jr wrote:

> --- On Tue, 11/20/07, Finn Lassen <dcio(at)AxiomInt(dot)com> wrote:
>> Here is a VB code snippet:
>>     Dim dbOut As ADODB.Connection
>>     Dim rsOut As ADODB.Recordset
>>     Set dbOut = New ADODB.Connection
>>     Set rsOut = New ADODB.Recordset
>>         .ConnectionString = "Driver={PostgreSQL
>> ANSI};Server=localhost;Port=5432;Database=postgres;Uid=postgres;Pwd=n 
>> one;"
>> Should I have created the table "Contact1" WITH
>> OIDS ?
> I wonder if this is a problem with the way your ODBC driver is  
> configured.   If it is a problem with your ODBC driver  
> configuration, you might also try posting to the PostgreSQL-ODBC  
> mailing list.
> Also, why did you choose the ANSI driver over the Unicode driver?
> Regards,
> Richard Broersma Jr.
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo(at)postgresql(dot)org so that  
> your
>        message can get through to the mailing list cleanly

In response to


pgsql-php by date

Next:From: Richard HuxtonDate: 2007-11-21 08:34:17
Subject: Re: Normalization tools for postgres?
Previous:From: Richard Broersma JrDate: 2007-11-21 04:33:56
Subject: Re: VB ADODB .Open failing

pgsql-general by date

Next:From: Kathy LoDate: 2007-11-21 07:39:43
Subject: Restart a sequence regularly
Previous:From: Reg Me PleaseDate: 2007-11-21 07:01:56
Subject: MAybe a FAQ

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group