[BUGS] No way to list DDL for a new type
Hi, I created a new type as follows: CREATE TYPE compfoo AS (f1 int, f2 text); Now I need the DDL which postgres used to create this type. Thanks. With Regards, rc_bio
Re: [BUGS] No way to list DDL for a new type
Rajesh Chopra wrote: Hi, I created a new type as follows: CREATE TYPE compfoo AS (f1 int, f2 text); Now I need the DDL which postgres used to create this type. Huh, what do you mean? That CREATE TYPE statement is DDL. Anyway, this doesn't sound like a bug. Please use the appropriate mailing list, probably pgsql-general. This list is for bug reports only. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] No way to list DDL for a new type
On 6/11/08, Heikki Linnakangas <[EMAIL PROTECTED]> wrote: > Rajesh Chopra wrote: > > Hi, > > I created a new type as follows: > > CREATE TYPE compfoo AS (f1 int, f2 text); > > > > Now I need the DDL which postgres used to create this type. > > > > Huh, what do you mean? That CREATE TYPE statement is DDL. I think what the OP was asking was how to reverse engineer the DDL out of the database for an already created type (but you're right, this is not a bug). in psql, the create type source sql is not displayed like it is for views for example. There are a couple of ways to do this: *) pg_dump -s and examine the output *) fire up pgadmin, browse types folder-- pgadmin shows source ddl for all database objects Also, composite types (CREATE TYPE AS), are trivially reverse engineered from the column lists. Non composite types are a little more complicated. side thought -- it would be nice for pg_restore to be able to extract more specific objects out of the custom format dump than what it currently allows...types for example. merlin -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] Bug in select to_char(now(), 'YYYY/MM/DD HH24:MI:SS:MS')
Hi, Sometimes, when we run the SQL request : select to_char(now(), '/MM/DD HH24:MI:SS:MS') we've got the result : 2008/06/11 15:01:06:1000 instead of : 2008/06/11 15:01:07:000 Our version of postgres is PostgreSQL 8.2.6 64-bit on i386-pc-solaris2.10, compiled by /ws/on10-tools/SUNWspro/SS11/bin/cc -Xa Thanks for your prompt answer. Pierre Le Mouëllic -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs