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

Re: Can schemas be ordered regarding their creation time ?

From: Amador Alvarez <aalvarez(at)d2(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Can schemas be ordered regarding their creation time ?
Date: 2012-06-06 20:44:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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 
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,

I have been trying a lot of different options to do this :


On 06/06/2012 01:06 AM, hari(dot)fuchs(at)gmail(dot)com wrote:
> Amador Alvarez<aalvarez(at)d2(dot)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

In response to


pgsql-admin by date

Next:From: Richard AlbrightDate: 2012-06-06 21:03:50
Subject: Re: Hstore vs simple K:V
Previous:From: A JDate: 2012-06-06 20:33:38
Subject: Hstore vs simple K:V

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