From: Amador Alvarez <aalvarez@d2.com>
To: pgsql-admin@postgresql.org
Subject: Re: Can schemas be ordered regarding their creation time ?
Date: Wed, 06 Jun 2012 13:44:46 -0700
Message-ID: <4FCFC13E.5040503@d2.com> (raw)
In-Reply-To: <877gvkc1a6.fsf@hf.protecting.net>
References: <4FCEA2DF.3010904@d2.com>
<877gvkc1a6.fsf@hf.protecting.net>
Thanks hary and Matthias,
It is a very good idea, however the schema names are meaningful and not
allowed to be attached to a date.
Regarding the comment solution ("COMMENT ON SCHEMA x IS 'y'"), it sounds
great and I tried to run different examples without happy ending as 'y'
must be a literal string.
I ran commands like these :
comment on schema users is select to_char(current_timestamp,'DD Mon YYYY');
comment on schema users is select
quote_literal(to_char(current_timestamp,'DD Mon YYYY'));
..... and even simple concatenated strings : comment on schema users is
'a'||'b';
ERROR: syntax error at or near "||"
LINE 1: comment on schema users is 'a'||'b';
... and even with a function returning a text ... : (
Any idea on doing ("COMMENT ON SCHEMA x IS 'y'") as 'y' variable?
Thanks again,
I appreciate it a lot,
A.A.
I have been trying a lot of different options to do this :
"COMMENT ON SCHEMA x IS 'y'".
On 06/06/2012 01:06 AM, hari.fuchs@gmail.com wrote:
> Amador Alvarez<aalvarez@d2.com> writes:
>
>> Hi there,
>> I would like to know if it is possible to get the date when the
>> different schemas were created, as I want to write an script to dump
>> only the latest schemas, the latest month created schemas for
>> instance.
> You could attach the creation date to the schema name or use
> "COMMENT ON SCHEMA x IS 'y'".
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: aalvarez@d2.com
Subject: Re: Can schemas be ordered regarding their creation time ?
In-Reply-To: <4FCFC13E.5040503@d2.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox