Thread: More on Order by

More on Order by

From
lsunley@mb.sympatico.ca
Date:
Hi All

I have discovered that when I use a table like this

create table whois (acol name);

and insert a few rows, the order by clause works correctly.

I dug into the database init stuff to find that the table pg_class column
relname is where the pg_tables column tablename comes from. That column is
defined as a 'name' datatype.

So what is difference between a "name" and a char(10)???

Lorne

-- 
-----------------------------------------------------------
lsunley@mb.sympatico.ca
-----------------------------------------------------------



Re: More on Order by

From
Michael Fuhr
Date:
On Sun, Dec 26, 2004 at 02:57:08PM -0500, lsunley@mb.sympatico.ca wrote:

> So what is difference between a "name" and a char(10)???

See the "Character Types" section in the "Data Types" chapter of
the documentation.

"The name type exists _only_ for storage of identifiers in the
internal system catalogs and is not intended for use by the general
user."

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


Re: More on Order by

From
lsunley@mb.sympatico.ca
Date:
OK

I believe that..

But why does order by work on a "name" column but not a "char(10)" column.

See my earlier (posted later because of problems) e-mail.

Lorne

In <20041226211640.GA28590@winnie.fuhr.org>, on 12/26/04   at 02:16 PM, Michael Fuhr <mike@fuhr.org> said:

>On Sun, Dec 26, 2004 at 02:57:08PM -0500, lsunley@mb.sympatico.ca wrote:

>> So what is difference between a "name" and a char(10)???

>See the "Character Types" section in the "Data Types" chapter of the
>documentation.

>"The name type exists _only_ for storage of identifiers in the internal
>system catalogs and is not intended for use by the general user."



-- 
-----------------------------------------------------------
lsunley@mb.sympatico.ca
-----------------------------------------------------------