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

Re: Table definition

From: Bruno Prévost <bp(at)interaction(dot)ws>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Table definition
Date: 2004-11-16 16:49:11
Message-ID: 044a01c4cbfc$330306d0$5d00a8c0@BRUNO2500 (view raw or flat)
Thread:
Lists: pgsql-sql
It could help me, but pg_dump give all foreigns key and index creation.
I'm not sure if it's not better to write a custom function in plpgsql.
Bruno

----- Original Message ----- 
From: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
To: "Bruno Prévost" <bp(at)interaction(dot)ws>
Cc: <pgsql-sql(at)postgresql(dot)org>
Sent: Tuesday, November 16, 2004 11:13 AM
Subject: Re: [SQL] Table definition


> Am Dienstag, 16. November 2004 16:40 schrieb Bruno Prévost:
>> I need to use it in sql.
>
> There is no direct way to do this in SQL, but I can offer you the 
> following
> alternative:
>
> CREATE FUNCTION get_table_definition(text) RETURNS text AS '
> #!/bin/sh
> pg_dump -t $1
> ' LANGUAGE plsh;
>
> :)
>
> -- 
> Peter Eisentraut
> http://developer.postgresql.org/~petere/
> 


In response to

pgsql-sql by date

Next:From: Pierre-Frédéric CaillaudDate: 2004-11-16 18:51:31
Subject: Re: tree structure photo gallery date quiery
Previous:From: Peter EisentrautDate: 2004-11-16 16:13:34
Subject: Re: Table definition

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