ROTECTED]>
Cc: <[EMAIL PROTECTED]>
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:
CR
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 Eis
I need to use it in sql.
Thk
Bruno
- Original Message -
From: "Peter Eisentraut" <[EMAIL PROTECTED]>
To: "Bruno Prévost" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 16, 2004 10:16 AM
Subject: Re: [SQL] Table definition
Am Die
Bruno Prévost wrote:
>Anybody know how to obtain the table definition in text.
Not quite sure if this is quite what you're after, but would:
$ pg_dump -st foo
help at all? It gives out the SQL that you would need to enter to
re-create the table.
Sam
---(end of bro
Title: Les consultants Interaction | stationery
Probably there is no direct way get the definition (i could
not find one atleast).
You can probably write a custom function which gives all
columns, indexes and formulate a create table statement (text
definition).
Let us know if you find a wa
Am Dienstag, 16. November 2004 15:04 schrieb Bruno Prévost:
> Anybody know how to obtain the table definition in text.
Use pg_dump.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
---(end of broadcast)---
TIP 6: Have you searched our