pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
table name - TypeCreate error
3+ messages / 3 participants
[nested] [flat]

* table name - TypeCreate error
@ 2002-01-24 13:20 Felipe Nievinski <fnievinski@terra.com.br>
  2002-01-24 13:37 ` Re: table name - TypeCreate error Radu-Adrian Popescu <radu.popescu@aldratech.com>
  2002-01-24 15:00 ` Re: table name - TypeCreate error Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 3+ messages in thread

From: Felipe Nievinski @ 2002-01-24 13:20 UTC (permalink / raw)
  To: pgsql-sql

Hi.

Please, I would like to know why I can't create a table with a name 
equal of a type name.

For example, when a try this:
	CREATE TABLE time (id int);
I get the following error message:
	ERROR:  TypeCreate: type time already defined

I would expect to be able to create a table with any name different 
than others tables' name.

Thank you in advance,
Felipe.





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: table name - TypeCreate error
  2002-01-24 13:20 table name - TypeCreate error Felipe Nievinski <fnievinski@terra.com.br>
@ 2002-01-24 13:37 ` Radu-Adrian Popescu <radu.popescu@aldratech.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Radu-Adrian Popescu @ 2002-01-24 13:37 UTC (permalink / raw)
  To: Felipe Nievinski <fnievinski@terra.com.br>; +Cc: pgsql-sql

On Thu, 2002-01-24 at 15:20, Felipe Nievinski wrote:
> Hi.
> 
> Please, I would like to know why I can't create a table with a name 
> equal of a type name.
> 
> For example, when a try this:
> 	CREATE TABLE time (id int);
> I get the following error message:
> 	ERROR:  TypeCreate: type time already defined
> 
> I would expect to be able to create a table with any name different 
> than others tables' name.
> 
> Thank you in advance,
> Felipe.
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

teamsheet=# CREATE TABLE "time" (id int);
ERROR:  type named time already exists
teamsheet=# CREATE TABLE "Time" (id int);
CREATE

:-)

-- 



Radu-Adrian Popescu
CSA, DBA, Programmer




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: table name - TypeCreate error
  2002-01-24 13:20 table name - TypeCreate error Felipe Nievinski <fnievinski@terra.com.br>
@ 2002-01-24 15:00 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2002-01-24 15:00 UTC (permalink / raw)
  To: Felipe Nievinski <fnievinski@terra.com.br>; +Cc: pgsql-sql

"Felipe Nievinski" <fnievinski@terra.com.br> writes:
> I would expect to be able to create a table with any name different 
> than others tables' name.

A table also implies a type (for its rowtype) in Postgres.  Sorry.

In 7.3 this will be less of a problem since user tables will live in
a different schema than system types do.  For now, there's nothing
you can do except name your table something else.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-01-24 15:00 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-01-24 13:20 table name - TypeCreate error Felipe Nievinski <fnievinski@terra.com.br>
2002-01-24 13:37 ` Radu-Adrian Popescu <radu.popescu@aldratech.com>
2002-01-24 15:00 ` Tom Lane <tgl@sss.pgh.pa.us>

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