Thread: the integer type

the integer type

From
"Zahir Lalani"
Date:
Hello All

I have only recently started to use Postgresql and have a problem. I am
using v8.1 on windows.
I cannot seem to get the DB to accept either INT or INTEGER as a type
when using the admin tool. Only INT2 or INT4 work.
I even downloaded Navicat trial and this has the same issue. Is there a
setup required to allow these
standard types to be enabled?


Zahir Lalani





______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

Re: the integer type

From
"chris smith"
Date:
> I have only recently started to use Postgresql and have a problem. I am
> using v8.1 on windows.
> I cannot seem to get the DB to accept either INT or INTEGER as a type
> when using the admin tool. Only INT2 or INT4 work.
> I even downloaded Navicat trial and this has the same issue. Is there a
> setup required to allow these
> standard types to be enabled?

It's a built in type so you don't need to do anything.

So something like this:

create table t1(a int);

fails?

What message do you get?

--
Postgresql & php tutorials
http://www.designmagick.com/

Re: the integer type

From
"chris smith"
Date:
On 4/14/06, Zahir Lalani <zahir@systemz.net> wrote:
> Hi Chris
>
> I am using pgAdmin III.
>
> Created a table, then started adding fields. This is where the problem
> hits - the drop down does not give you an INTEGER option, so you cannot
> shoose it.
> Also I tried creating a script in the query view and running it, but
> again, if I used INT or INTEGER it errors. Change it INT4 and its fine.


What error do you get? I'm sure pgAdmin will show something.

Try it from console:

psql.exe dbname
create table t1(a int);

(Always CC the list, someone else might be able to help you if I don't
know the answer).

> > -----Original Message-----
> > From: chris smith [mailto:dmagick@gmail.com]
> > Sent: 13 April 2006 15:17
> > To: Zahir Lalani
> > Cc: pgsql-general@postgresql.org
> > Subject: Re: [GENERAL] the integer type
> >
> >
> > > I have only recently started to use Postgresql and have a
> > problem. I am
> > > using v8.1 on windows.
> > > I cannot seem to get the DB to accept either INT or INTEGER
> > as a type
> > > when using the admin tool. Only INT2 or INT4 work.
> > > I even downloaded Navicat trial and this has the same
> > issue. Is there a
> > > setup required to allow these
> > > standard types to be enabled?
> >
> > It's a built in type so you don't need to do anything.
> >
> > So something like this:
> >
> > create table t1(a int);
> >
> > fails?
> >
> > What message do you get?
> >
> > --
> > Postgresql & php tutorials
> > http://www.designmagick.com/
> >
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>


--
Postgresql & php tutorials
http://www.designmagick.com/

Re: the integer type

From
Tony Caduto
Date:
chris smith wrote:
>
> What error do you get? I'm sure pgAdmin will show something.
>
> Try it from console:
>
> psql.exe dbname
> create table t1(a int);
>
> (Always CC the list, someone else might be able to help you if I don't
> know the answer).
>
It's not a error, pgAdmin III simply does not display the word integer
in it's drop down comboboxes, it uses all the internal representation of
types not the SQL standard aliases.

PG Lightning Admin on the other hand does use the SQL standard names in
the comboboxes which make things a little easier for those coming from
other databases and that's why PG
Lightning Admin is the best choice for all users running a win32 desktop
or coming from another database system such as MS SQL server.  Just
because it's free (pgAdminIII) does not mean it should be your only or
best choice.

pgAdmin III also won't accept double precision in it's type selection
combobox.

Later,

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration


Re: the integer type

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Tony Caduto
> Sent: 13 April 2006 16:19
> To: chris smith
> Cc: Zahir Lalani; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] the integer type
>
> It's not a error, pgAdmin III simply does not display the
> word integer in it's drop down comboboxes, it uses all the
> internal representation of types not the SQL standard aliases.

Which allows you to use any custom datatype or domain that you like.

> PG Lightning Admin on the other hand does use the SQL
> standard names in the comboboxes which make things a little
> easier for those coming from other databases and that's why
> PG Lightning Admin is the best choice for all users running a
> win32 desktop or coming from another database system such as
> MS SQL server.  Just because it's free (pgAdminIII) does not
> mean it should be your only or best choice.
>
> pgAdmin III also won't accept double precision in it's type
> selection combobox.

double precision == float8
(http://www.postgresql.org/docs/8.1/interactive/datatype.html) which
works just fine.

Regards, Dave.

Re: the integer type

From
Tony Caduto
Date:
Dave Page wrote:
>
> Which allows you to use any custom datatype or domain that you like.
>
>
> double precision == float8
> (http://www.postgresql.org/docs/8.1/interactive/datatype.html) which
> works just fine.
>
> Regards, Dave.
>
>
Actually if you try and type in integer in the combobox, it accepts the
text, but the ok button wont enable until you pick one from the list.
Yes, you could make a "integer" domain but why would you do that when
Postgresql actually will accept a type called integer?

I just tried it on version 1.4.2 and it will not accept integer in the
combobox for a new field in the table editor.

The whole point here is people coming from systems such as MS SQL server
for example have no clue what int4 or float8 is.

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration


Re: the integer type

From
"Zahir Lalani"
Date:
This is exactly how I felt - It made me wonder whether I should go back
to MS SQL - the whole UI experience is much better.

But now that I have seen lightning - hopefully it will get easier. Also,
I was trying to connect this to ColdFusion/Dreamweaver.
Since the field was defined as int4, Coldfusion raised an error in its
validation as it had no clue what int4 was?

Zahir

> >
> Actually if you try and type in integer in the combobox, it
> accepts the
> text, but the ok button wont enable until you pick one from the list.
> Yes, you could make a "integer" domain but why would you do that when
> Postgresql actually will accept a type called integer?
>
> I just tried it on version 1.4.2 and it will not accept
> integer in the
> combobox for a new field in the table editor.
>
> The whole point here is people coming from systems such as MS
> SQL server
> for example have no clue what int4 or float8 is.
>
> --
> Tony Caduto
> AM Software Design
> http://www.amsoftwaredesign.com
> Home of PG Lightning Admin for Postgresql
> Your best bet for Postgresql Administration


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

Re: the integer type

From
Tony Caduto
Date:
Zahir Lalani wrote:
> This is exactly how I felt - It made me wonder whether I should go back
> to MS SQL - the whole UI experience is much better.
>
> But now that I have seen lightning - hopefully it will get easier. Also,
> I was trying to connect this to ColdFusion/Dreamweaver.
> Since the field was defined as int4, Coldfusion raised an error in its
> validation as it had no clue what int4 was?
>
> Zahir
>
>
PG Lightning Admin was created with input from several MS SQL server
DBAs who just absolutely detested pgAdmin III.
We where converting a large MS SQL application to Postgresql and they
complained to me every day about pgAdmin, so I started writing PG
Lightning admin for them and it took
off from there.  If you have never used a RDBMS before, pgAdmin III is
acceptable, but once you have used tools like the MS Query Analyser or
even commercial admin tools for Firebird (IB expert for example) it
(pgAdmin) really starts to lose it's luster.

I admit my views on this subject are biased though :-)

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration


Re: the integer type

From
"Zahir Lalani"
Date:
Tony

Just a thought. I have spent the last couple of weeks googling for admin
tools for Postgres - and never came across yours!

Zahir

> >
> >
> PG Lightning Admin was created with input from several MS SQL server
> DBAs who just absolutely detested pgAdmin III.
> We where converting a large MS SQL application to Postgresql and they
> complained to me every day about pgAdmin, so I started writing PG
> Lightning admin for them and it took
> off from there.  If you have never used a RDBMS before,
> pgAdmin III is
> acceptable, but once you have used tools like the MS Query
> Analyser or
> even commercial admin tools for Firebird (IB expert for example) it
> (pgAdmin) really starts to lose it's luster.
>
> I admit my views on this subject are biased though :-)


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

Re: the integer type

From
Peter Eisentraut
Date:
Dave Page wrote:
> > It's not a error, pgAdmin III simply does not display the
> > word integer in it's drop down comboboxes, it uses all the
> > internal representation of types not the SQL standard aliases.
>
> Which allows you to use any custom datatype or domain that you like.

That is completely unrelated.  If pgadmin (or any tool) passed the data
types it presumably fetches from pg_type or thereabouts through the
format_type function it could present the user with a full list of
actually available data types but in their preferred spellings.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: the integer type

From
"Dave Page"
Date:

> -----Original Message-----
> From: Peter Eisentraut [mailto:peter_e@gmx.net]
> Sent: 17 April 2006 20:16
> To: pgsql-general@postgresql.org
> Cc: Dave Page; Tony Caduto; chris smith; Zahir Lalani
> Subject: Re: [GENERAL] the integer type
>
> Dave Page wrote:
> > > It's not a error, pgAdmin III simply does not display the word
> > > integer in it's drop down comboboxes, it uses all the internal
> > > representation of types not the SQL standard aliases.
> >
> > Which allows you to use any custom datatype or domain that you like.
>
> That is completely unrelated. If pgadmin (or any tool)
> passed the data types it presumably fetches from pg_type or
> thereabouts through the format_type function it could present
> the user with a full list of actually available data types
> but in their preferred spellings.

It's not at all unrelated - it just means that none of us were aware of
the existance of format_type.

Regards, Dave.

Re: the integer type

From
Tony Caduto
Date:
Peter Eisentraut wrote:
> Dave Page wrote:
>
>>> It's not a error, pgAdmin III simply does not display the
>>> word integer in it's drop down comboboxes, it uses all the
>>> internal representation of types not the SQL standard aliases.
>>>
>> Which allows you to use any custom datatype or domain that you like.
>>
>
> That is completely unrelated.  If pgadmin (or any tool) passed the data
> types it presumably fetches from pg_type or thereabouts through the
> format_type function it could present the user with a full list of
> actually available data types but in their preferred spellings.
>
>
Yes, PG Lightning Admin uses the format_type function, though I modify
some of the returned pretty names.
I change "character varying" back to varchar etc.

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration