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: problème sur un champ



	fabien wrote:

> J'ai un champ inet dans ma table mère, mais lorsque  j'exécute un 
> insert  sur la  table partitionnée (la table fille correspondante 
> n'existant pas), j'obtiens une erreur "ERREUR:  L'opérateur n'existe pas 
> : text || inet"
> 
> j'ai essayé toutes les solutions possibles (où du moins celles que je 
> connaissais : transtypage avec ::inet, déclaration d'une variable ip 
> inet afin d'être initialisé avec la valeur NEW.remote_addr, ...) sans 
> aucun résultat, la seule solution trouvée est de remplacer le champ inet 
> par un champ text. Ceci reste fonctionnel mais me laisse insatisfait.

Mais pourquoi pas remplacer:

EXECUTE 'INSERT INTO log_audiotel_' || annee || '_' || mois || ' 
VALUES ( TIMESTAMP ''' || NEW.date || ''',''' || NEW.remote_addr || ''')'; 

par

EXECUTE 'INSERT INTO log_audiotel_' || annee || '_' || mois || ' 
VALUES ( TIMESTAMP ''' || NEW.date || ''',''' || CAST(NEW.remote_addr AS text)
|| ''')';

tout simplement?

-- 
 Daniel
 PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org




Home | Main Index | Thread Index

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