Re: Error al llamar procedimiento con distintas variables de entrada

From: "Miguel Huerta" <hgmiguel(at)gmail(dot)com>
To: "Julio Rivero" <jcrmlima(at)gmail(dot)com>, "Miguel Huerta" <hgmiguel(at)gmail(dot)com>, "Lista PostGreSQL" <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Error al llamar procedimiento con distintas variables de entrada
Date: 2006-05-23 21:15:36
Message-ID: aa9ca9610605231415y54fe06b8t9b79b6a76cd7d226@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Integer Types [1]

The types smallint, integer, and bigint store whole numbers,
that is, numbers without fractional components, of various ranges.
Attempts to store values outside of the allowed range will result in
an error.

The type integer is the usual choice, as it offers the best
balance between range, storage size, and performance. The
smallint type is generally only used if disk space is at a
premium. The bigint type should only be used if the integer
range is not sufficient, because the latter is definitely faster.

Function calls [2]

Much of the PostgreSQL type system is built around a rich set of
functions. Functions can have one or more arguments. Since PostgreSQL
permits function overloading, the function name alone does not
uniquely identify the function to be called; the parser must select
the right function based on the data types of the supplied arguments.

Eso es todo lo que he encontrado en la documentación, no se como es
que se da cuenta de que un 1 es un bigint y no un int2, pero siguiendo
con la definición de arriba siempre debe de existir un cast al tipo
correcto.

Relativo a los numero, creo que no es muy explicito si se refiere a
que el usuario debe preferir usar el tipo integer o si PostgreSQL
prefiere usar el tipo integer, si esto es asi, creo que windows no
soporta numero de 8 bits por lo que un int8 lo combierte a integer, es
por esto que tu funcion funciona con datos de tipo int8, igual
funcionaría si lo pusieras con integer.

[1]http://www.postgresql.org/docs/8.1/interactive/datatype.html#DATATYPE-NUMERIC
[2] http://www.postgresql.org/docs/8.1/interactive/typeconv.html

--
http://hgMiguel.blogspot.com/
hgMiguel(at)gmail(dot)com

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Leonel Nunez 2006-05-23 21:31:50 Re: Consulta - Principiante
Previous Message Raúl Mero 2006-05-23 21:03:55 Consulta - Principiante