Josh Harrison joshques at gmail.com
Thu Dec 13 08:14:31 PST 2007
On Dec 13, 2007 9:58 AM, Geoffrey <lists at serioustechnology.com> 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
josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20071213/=
bdf059da/attachment.htm


More information about the Slony1-general mailing list