On 2009-01-20, Igor Katson wrote:
> Is there a way to get i.e. table creation sql script from an existing
> table in psql (not postgresql, but psql client), like it is in pgAdmin?
>
> I.e. i point it to existing table 'foo', and it writes:
> CREATE TABLE foo (
>bar int
> );
pg_dump dbname --
In response to Igor Katson :
> Is there a way to get i.e. table creation sql script from an existing
> table in psql (not postgresql, but psql client), like it is in pgAdmin?
>
> I.e. i point it to existing table 'foo', and it writes:
> CREATE TABLE foo (
> bar int
> );
wait for 8.4:
http://de
try exhausting possibilities there. Many ppl don't know that you can
have multiple -t objects , and than use -T for stuff you don't want as
well. It does the job pretty often I have to say.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
Grzegorz Jaśkiewicz wrote:
pg_dump -t ANYOBJECT database
afaik., try it - play with it.
that does not work for indices. But the index creation is shown when
placing it's parent table into -t. Thanks for the help, Grzegorz, the
issue is solved.
--
Sent via pgsql-general mailing list (pgsq
pg_dump -t ANYOBJECT database
afaik., try it - play with it.
--
GJ
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Grzegorz Jaśkiewicz wrote:
pg_dump -t foo database
Thanks, but pg_dump is not psql client (i meant the */bin/psql
interactive shell), and there is only an option for table objects, and
no one for i.e. indices.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make ch
pg_dump -t foo database
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Is there a way to get i.e. table creation sql script from an existing
table in psql (not postgresql, but psql client), like it is in pgAdmin?
I.e. i point it to existing table 'foo', and it writes:
CREATE TABLE foo (
bar int
);
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.