From: | Steve Midgley <science(at)misuse(dot)org> |
---|---|
To: | Suresh Raja <suresh(dot)rajaabc(at)gmail(dot)com> |
Cc: | Melvin Davidson <melvin6925(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] documenting tables version control |
Date: | 2015-05-06 14:36:54 |
Message-ID: | CAJexoSJWc6W5xcEWxAK=zP7xw-12oqK-n4MD3w1boaFz2-xiZQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
I just use sql tables. But if I represent them outside of pg I usually use
migration files which are part of ruby on rails. But sqitch looks good too.
Steve
On May 6, 2015 7:31 AM, "Suresh Raja" <suresh(dot)rajaabc(at)gmail(dot)com> wrote:
> Thanks Melvin, Joshua, PT and Steve!
>
> your information is good. Im looking for creating a catalog for my
> application schema. Do you have anything that you use for catalog of your
> schema. Maybe using excel.
>
> Thanks,
> SR
>
> On Tue, May 5, 2015 at 4:42 PM, Melvin Davidson <melvin6925(at)gmail(dot)com>
> wrote:
>
>> Try this query and see if it fulfills your needs. Adjust the WHERE clause
>> as needed.
>>
>> SELECT
>> table_catalog as database,
>> table_schema as schema,
>> table_name as table,
>> column_name as column,
>> ordinal_position as position,
>> column_default as default,
>> is_nullable,
>> data_type as type,
>> character_maximum_length as max_length
>> FROM information_schema.columns
>> WHERE table_name LIKE 'T%'
>> ORDER BY table_catalog,
>> table_schema,
>> table_name,
>> ordinal_position;
>>
>> On Tue, May 5, 2015 at 4:28 PM, Joshua D. Drake <jd(at)commandprompt(dot)com>
>> wrote:
>>
>>>
>>> On 05/05/2015 01:13 PM, Suresh Raja wrote:
>>>
>>>> Hi All:
>>>>
>>>>
>>>> I have tables with different versions in the same schema. Like
>>>> T1a, T1b, T1c
>>>> T2a, T2b, T2c, T2d
>>>> ....
>>>> ...
>>>> etc.
>>>>
>>>>
>>>> I'm interested in documenting various version of tables, may be in excel
>>>> sheet or may be in another schema in the database. I would like to
>>>> store information on table name, column names, column order, pry key
>>>> column etc. Also is there a way I can reverse engineer from the
>>>> database itself.
>>>>
>>>> Let me know if anybody any suggestion or format that they used. I
>>>> appreciate all your help and shall be suitably acknowledged.
>>>>
>>>
>>> Take a look at sqitch.
>>>
>>> JD
>>>
>>>
>>>
>>>> Thanks,
>>>> -Suresh Raja
>>>>
>>>>
>>>
>>> --
>>> Command Prompt, Inc. - http://www.commandprompt.com/ 503-667-4564
>>> PostgreSQL Centered full stack support, consulting and development.
>>> Announcing "I'm offended" is basically telling the world you can't
>>> control your own emotions, so everyone else should do it for you.
>>>
>>>
>>> --
>>> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-general
>>>
>>
>>
>>
>> --
>> *Melvin Davidson*
>> I reserve the right to fantasize. Whether or not you
>> wish to share my fantasy is entirely up to you.
>>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2015-05-06 14:40:48 | Re: [SQL] documenting tables version control |
Previous Message | Steve Midgley | 2015-05-06 14:35:06 | Re: [GENERAL] documenting tables version control |
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2015-05-06 14:40:48 | Re: [SQL] documenting tables version control |
Previous Message | Steve Midgley | 2015-05-06 14:35:06 | Re: [GENERAL] documenting tables version control |