On Dec 13, 2007 11:29 AM, Geoffrey <[EMAIL PROTECTED]> wrote:
> Josh Harrison wrote:
> > On Dec 13, 2007 9:58 AM, Geoffrey <[EMAIL PROTECTED]> wrote:
> >
> >> Josh Harrison wrote:
> >>>>> On Wed, Dec 12, 2007 at 02:22:58PM -0500, Geoffrey wrote:
> >>>>>> I was afraid that would be the answer, thanks.
> >>>>> This is an easy script to write, though. You can get every table
> name
> >>>> out
> >>>>> of postgres quite easily.
> >>> How do you write this script? I have a database with 100 tables and i
> >> have
> >>> to replicate them all. And if tey dont have a PK then you have to
> >> generate a
> >>> slony serial key...right!!!!
> >>> josh
> >>
> >> All of my tables have PK, so that's not a problem for me. All I had to
> >> do was produce a common separated list of the tables and then import
> >> that into the slon_tools.conf file:
> >>
> >> echo '\d' |psql -t -p 5443 swr|
> >> awk -F'|' '/ table /{gsub(" ", "", $2);printf "%s,\n", $2}'
> >
> >
> >
> > Thanks...I tried this
> > echo '\d' |psql -t -p 5432 bench_replication|awk -F'|' '/ table /{gsub("
> ",
> > "", $2);printf "%s,\n", $2}'
> >
> > and I get this error
> > awk: syntax error near line 1
> > awk: illegal statement near line 1
> >
> > Can you help
>
> Hmm, works fine for me, what does this produce:
>
> echo '\d' |psql -t -p 5432 bench_replication
>
public | accounts | table | josh
public | branches | table | josh
public | dummy1 | table | josh
public | dummy2 | table | josh
public | history | table | josh
public | tellers | table | josh
This s just a test database
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general