Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: RE: [pgsql-fr-generale] appel de


  • From: "Froggy / Froggy Corp." <froggy(at)froggycorp(dot)com>
  • To: david bigand forum <dforums(at)vieonet(dot)com>
  • Cc: pgsql-fr-generale(at)postgresql(dot)org
  • Subject: Re: RE: [pgsql-fr-generale] appel de
  • Date: Wed, 23 Nov 2005 17:03:56 +0100
  • Message-id: <438492EC(dot)990427A5(at)froggycorp(dot)com>

J'aurais propose a vue de nez de tester deux choses :

select public."checkIpValid" (inet
'127.0.0.1',varchar'{"RF98QLDF","AOIEZR323G","QDQS"}',varchar
'clickr',varchar'clkr');

avec la function tel quel

et

CREATE FUNCTION "checkIpValidity"(inet, text[], character
varying, character varying) RETURNS boolean

mais avec

select public."checkIpValid" (inet
'127.0.0.1','{"RF98QLDF","AOIEZR323G","QDQS"}',varchar
'clickr',varchar'clkr');

david bigand forum wrote:
> 
> Je ne sais pas l'habitude de VARCHAR, parce que quel est l'intérêt de "text"
> par rapport à "caractere varying", svp ?
> 
> Mais le problème ce situe au niveau du tableau, et du faite de devoir
> préciser tout les types pour qu'il veuille bien exécuter la requête, et dans
> le cas du tableau je ne sais pas comment préciser le type pour que ça
> marche.
> 
> David
> 
> -----Message d'origine-----
> De : Froggy / Froggy Corp. [mailto:froggy(at)froggycorp(dot)com]
> Envoyé : mercredi 23 novembre 2005 15:59
> À : david bigand forum
> Cc : pgsql-fr-generale(at)postgresql(dot)org
> Objet : Re: [pgsql-fr-generale] appel de procédure
> 
> Bonjour,
> 
> Une petite question, qu'elle est l utilite d'utiliser "charactere
> varying" plutot que "text" ?
> 
> david bigand forum wrote:
> >
> > Bonjour
> >
> > Voici mon blème
> >
> > J'ai une procédure qui attend les données suivante :
> > CREATE FUNCTION "checkIpValidity"(inet, character varying[], character
> > varying, character varying) RETURNS boolean
> >     AS $_$declare
> >  in_ip ALIAS FOR $1;
> >  in_data ALIAS FOR $2;
> >  in_table ALIAS FOR $3;
> >  in_prefix ALIAS FOR $4;
> >
> > je l'appel de la maniere suivante :
> > select public."checkIpValid" (inet
> > '127.0.0.1','{"RF98QLDF","AOIEZR323G","QDQS"}',varchar
> > 'clickr',varchar'clkr');
> >
> > et il me renvoie :
> > ERREUR:  la fonction public.checkIpValid(inet, "unknown", character
> varying,
> > character varying) n'existe pas
> > HINT:  Aucune fonction ne correspond au nom donné et aux types
> d'arguments.
> > Vous devez ajouter des conversions explicites de type.explicit type casts.
> >
> > Merci pour vos explication je ne comprend pas pourkoi il ne récupére pas
> les
> > champs avec les bonnes définitions, il a besoin de je reprécise les types
> > des variable que je lui envoie.
> >
> > Sauf que pour le tableau de VARCHAR, je ne sais pas comment lui
> réindiquer.
> >
> > Cordialement
> >
> > David Bigand
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: explain analyze is your friend
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group