Changeset 459

Show
Ignore:
Timestamp:
10/24/06 19:05:58 (2 years ago)
Author:
gleu
Message:

Arrêté à la ligne 1925 (refs #37).
Fin de libpq.xml (refs #46).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • traduc/trunk/manuel/ecpg.xml

    r453 r459  
    942942     <listitem> 
    943943      <para> 
    944        Convert an int variable to a numeric variable
     944       Convertit une variable int en une variable numeric
    945945<synopsis> 
    946946int PGTYPESnumeric_from_int(signed int int_val, numeric *var); 
    947947</synopsis> 
    948        This function accepts a variable of type signed int and stores it 
    949        in the numeric variable <literal>var</literal>. Upon success, 0 is returned and 
    950        -1 in case of a failure
     948       Cette fonction accepte une variable de type entier signé et la stocke 
     949       dans une variable <literal>var</literal> de type numeric. 
     950       La fonction renvoie 0 en cas de succès et -1 en cas d'erreur
    951951      </para> 
    952952     </listitem> 
     
    957957     <listitem> 
    958958      <para> 
    959        Convert a long int variable to a numeric variable
     959       Convertit une variable long int en une variable numeric
    960960<synopsis> 
    961961int PGTYPESnumeric_from_long(signed long int long_val, numeric *var); 
    962962</synopsis> 
    963        This function accepts a variable of type signed long int and stores it 
    964        in the numeric variable <literal>var</literal>. Upon success, 0 is returned and 
    965        -1 in case of a failure
     963       Cette fonction accepte une variable de type entier long signé et la stocke 
     964       dans une variable <literal>var</literal> de type numeric. 
     965       La fonction renvoie 0 en cas de succès et -1 en cas d'erreur
    966966      </para> 
    967967     </listitem> 
     
    972972     <listitem> 
    973973      <para> 
    974        Copy over one numeric variable into another one. 
     974       Copie une variable numeric sur une autre. 
    975975<synopsis> 
    976976int PGTYPESnumeric_copy(numeric *src, numeric *dst); 
    977977</synopsis> 
    978        This function copies over the value of the variable that 
    979        <literal>src</literal> points to into the variable that <literal>dst</literal> 
    980        points to. It returns 0 on success and -1 if an error occurs. 
     978       Cette fonction copie la valeur de la variable sur laquelle pointe 
     979       <literal>src</literal> dans la variable sur laquelle pointe 
     980       <literal>dst</literal>. 
     981       La fonction renvoie 0 en cas de succès et -1 en cas d'erreur. 
    981982      </para> 
    982983     </listitem> 
     
    987988     <listitem> 
    988989      <para> 
    989        Convert a variable of type double to a numeric. 
     990       Convertit une variable de type double en numeric. 
    990991<synopsis> 
    991992int  PGTYPESnumeric_from_double(double d, numeric *dst); 
    992993</synopsis> 
    993        This function accepts a variable of type double and stores the result 
    994        in the variable that <literal>dst</literal> points to. It returns 0 on success 
    995        and -1 if an error occurs
     994       Cette fonction accepte une variable de type double et la stocke dans la 
     995       variable sur laquelle pointe <literal>dst</literal>. 
     996       La fonction renvoie 0 en cas de succès et -1 en cas d'erreur
    996997      </para> 
    997998     </listitem> 
     
    10021003     <listitem> 
    10031004      <para> 
    1004        Convert a variable of type numeric to double. 
     1005       Convertit une variable de type numeric en double. 
    10051006<synopsis> 
    10061007int PGTYPESnumeric_to_double(numeric *nv, double *dp) 
    10071008</synopsis> 
    1008        The function converts the numeric value from the variable that 
    1009        <literal>nv</literal> points to into the double variable that <literal>dp</literal> points 
    1010        to. It retuns 0 on success and -1 if an error occurs, including 
    1011        overflow. On overflow, the global variable <literal>errno</literal> will be set 
    1012        to <literal>PGTYPES_NUM_OVERFLOW</literal> additionally. 
     1009       Cette fonction convertit la valeur numeric de la variable vers laquelle 
     1010       pointe <literal>nv</literal> sur une variable de type double sur laquelle 
     1011       pointe <literal>dp</literal>. 
     1012       La fonction renvoie 0 en cas de succès et -1 en cas d'erreur, ceci 
     1013       incluant un dépassement possible. En cas de dépassement, la variable globale 
     1014       <literal>errno</literal> sera en plus initialisée à 
     1015       <literal>PGTYPES_NUM_OVERFLOW</literal>. 
    10131016      </para> 
    10141017     </listitem> 
     
    10191022     <listitem> 
    10201023      <para> 
    1021        Convert a variable of type numeric to int. 
     1024       Convertit une variable de type numeric en int. 
    10221025<synopsis> 
    10231026int PGTYPESnumeric_to_int(numeric *nv, int *ip); 
    10241027</synopsis> 
    1025        The function converts the numeric value from the variable that 
    1026        <literal>nv</literal> points to into the integer variable that <literal>ip</literal> 
    1027        points to. It retuns 0 on success and -1 if an error occurs, including 
    1028        overflow. On overflow, the global variable <literal>errno</literal> will be set 
    1029        to <literal>PGTYPES_NUM_OVERFLOW</literal> additionally. 
     1028       Cette fonction convertit la valeur numeric de la variable vers laquelle 
     1029       pointe <literal>nv</literal> sur une variable de type integer sur laquelle 
     1030       pointe <literal>ip</literal>. 
     1031       La fonction renvoie 0 en cas de succès et -1 en cas d'erreur, ceci 
     1032       incluant un dépassement possible. En cas de dépassement, la variable globale 
     1033       <literal>errno</literal> sera en plus initialisée à 
     1034       <literal>PGTYPES_NUM_OVERFLOW</literal>. 
    10301035      </para> 
    10311036     </listitem> 
     
    10361041     <listitem> 
    10371042      <para> 
    1038        Convert a variable of type numeric to long
     1043       Convertit une variable de type numeric en long int
    10391044<synopsis> 
    10401045int PGTYPESnumeric_to_long(numeric *nv, long *lp); 
    10411046</synopsis> 
    1042        The function converts the numeric value from the variable that 
    1043        <literal>nv</literal> points to into the long integer variable that 
    1044        <literal>lp</literal> points to. It retuns 0 on success and -1 if an error 
    1045        occurs, including overflow. On overflow, the global variable 
    1046        <literal>errno</literal> will be set to <literal>PGTYPES_NUM_OVERFLOW</literal> 
    1047        additionally. 
     1047       Cette fonction convertit la valeur numeric de la variable vers laquelle 
     1048       pointe <literal>nv</literal> sur une variable de type long integer sur 
     1049       laquelle pointe <literal>lp</literal>. 
     1050       La fonction renvoie 0 en cas de succès et -1 en cas d'erreur, ceci 
     1051       incluant un dépassement possible. En cas de dépassement, la variable globale 
     1052       <literal>errno</literal> sera en plus initialisée à 
     1053       <literal>PGTYPES_NUM_OVERFLOW</literal>. 
    10481054      </para> 
    10491055     </listitem> 
     
    10541060     <listitem> 
    10551061      <para> 
    1056        Convert a variable of type numeric to decimal. 
     1062       Convertit une variable de type numeric en decimal. 
    10571063<synopsis> 
    10581064int PGTYPESnumeric_to_decimal(numeric *src, decimal *dst); 
    10591065</synopsis> 
    1060        The function converts the numeric value from the variable that 
    1061        <literal>src</literal> points to into the decimal variable that 
    1062        <literal>dst</literal> points to. It retuns 0 on success and -1 if an error 
    1063        occurs, including overflow. On overflow, the global variable 
    1064        <literal>errno</literal> will be set to <literal>PGTYPES_NUM_OVERFLOW</literal> 
    1065        additionally. 
     1066       Cette fonction convertit la valeur numeric de la variable vers laquelle 
     1067       pointe <literal>nv</literal> sur une variable de type decimal sur 
     1068       laquelle pointe <literal>dst</literal>. 
     1069       La fonction renvoie 0 en cas de succès et -1 en cas d'erreur, ceci 
     1070       incluant un dépassement possible. En cas de dépassement, la variable globale 
     1071       <literal>errno</literal> sera en plus initialisée à 
     1072       <literal>PGTYPES_NUM_OVERFLOW</literal>. 
    10661073      </para> 
    10671074     </listitem> 
     
    10721079     <listitem> 
    10731080      <para> 
    1074        Convert a variable of type decimal to numeric. 
     1081       Convertit une variable de type decimal en numeric. 
    10751082<synopsis> 
    10761083int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst); 
    10771084</synopsis> 
    1078        The function converts the decimal value from the variable that 
    1079        <literal>src</literal> points to into the numeric variable that 
    1080        <literal>dst</literal> points to. It retuns 0 on success and -1 if an error 
    1081        occurs. Since the decimal type is implemented as a limited version of 
    1082        the numeric type, overflow can not occur with this conversion. 
     1085       Cette fonction convertit la valeur decimal de la variable vers laquelle 
     1086       pointe <literal>nv</literal> sur une variable de type numeric sur 
     1087       laquelle pointe <literal>dst</literal>. 
     1088       La fonction renvoie 0 en cas de succès et -1 en cas d'erreur. Comme 
     1089       le type decimal est une version limitée du type numeric, un 
     1090       dépassement ne peut survenir avec cette conversion. 
    10831091      </para> 
    10841092     </listitem> 
     
    10891097 
    10901098  <sect2> 
    1091    <title>The date type</title> 
    1092    <para> 
    1093     The date type in C enables your programs to deal with data of the SQL type 
    1094     date. See <xref linkend="datatype-datetime"/> for the equivalent type in the 
    1095     <productname>PostgreSQL</productname> server. 
    1096    </para> 
    1097    <para> 
    1098     The following functions can be used to work with the date type: 
     1099   <title>Type date</title> 
     1100   <para> 
     1101    Le type date en C active la gestion des dates dans vos programmes. 
     1102    Voir <xref linkend="datatype-datetime"/> pour le type équivalent dans le 
     1103    serveur <productname>PostgreSQL</productname>. 
     1104   </para> 
     1105   <para> 
     1106    Les fonctions suivantes peuvent être utilisées pour travailler avec le type 
     1107    date&nbsp;: 
    10991108    <variablelist> 
    11001109     <varlistentry id="PGTYPESdatefromtimestamp"> 
     
    11021111      <listitem> 
    11031112       <para> 
    1104         Extract the date part from a timestamp. 
     1113        Extrait la date d'une variable de type timestamp. 
    11051114<synopsis> 
    11061115date PGTYPESdate_from_timestamp(timestamp dt); 
    11071116</synopsis> 
    1108         The function receives a timestamp as its only argument and returns the 
    1109         extracted date part from this timestamp
     1117            Cette fonction reçoit une variable de type timestamp comme seul argument 
     1118            et renvoie la partie date qui en est extraite
    11101119       </para> 
    11111120      </listitem> 
     
    11161125      <listitem> 
    11171126       <para> 
    1118        Parse a date from its textual representation
     1127        Analyse une date à partir de sa représentation textuelle
    11191128<synopsis> 
    11201129date PGTYPESdate_from_asc(char *str, char **endptr); 
    11211130</synopsis> 
    1122         The function receives a C char* string <literal>str</literal> and a pointer to 
    1123         a C char* string <literal>endptr</literal>. At the moment ecpg always parses 
    1124         the complete string and so it currently does not support to store the 
    1125         address of the first invalid character in <literal>*endptr</literal>. 
    1126         You can safely set <literal>endptr</literal> to NULL. 
    1127        </para> 
    1128        <para> 
    1129         Note that the function always assumes MDY-formatted dates and there is 
    1130         currently no variable to change that within ecpg. 
    1131        </para> 
    1132        <para> 
    1133         The following input formats are allowed: 
     1131            Cette fonction reçoit une chaîne C (char*) <literal>str</literal> et un 
     1132            pointeur vers une autre chaîne C, <literal>endptr</literal>. ecpg analyse 
     1133            toujours la chaîne complète. Du coup, ecpg ne supporte pas le stockage de 
     1134            l'adresse du premier caractère invalide dans <literal>*endptr</literal>. 
     1135            Vous pouvez initialiser <literal>endptr</literal> à NULL en toute 
     1136            sécurité. 
     1137       </para> 
     1138       <para> 
     1139            Notez que la fonction suppose toujours avoir des dates au format MDY et 
     1140            il n'y a actuellement aucune variable pour modifier ceci dans ecpg. 
     1141       </para> 
     1142       <para> 
     1143        Les formats suivants sont autorisées en entrée&nbsp;: 
    11341144        <table> 
    1135          <title>Valid input formats for <function>PGTYPESdate_from_asc</function></title> 
     1145         <title>Formats valides en entrée de <function>PGTYPESdate_from_asc</function></title> 
    11361146         <tgroup cols="2"> 
    11371147          <thead> 
    11381148           <row> 
    1139             <entry>Input</entry> 
    1140             <entry>Result</entry> 
     1149            <entry>Entrée</entry> 
     1150            <entry>Sortie</entry> 
    11411151           </row> 
    11421152          </thead> 
     
    12211231      <listitem> 
    12221232       <para> 
    1223         Return the textual representation of a date variable. 
     1233        Renvoie la représentation textuelle d'une variable date. 
    12241234<synopsis> 
    12251235char *PGTYPESdate_to_asc(date dDate); 
    12261236</synopsis> 
    1227         The function receives the date <literal>dDate</literal> as its only parameter. 
    1228         It will output the date in the form <literal>1999-01-18</literal>, i.e. in the 
    1229         <literal>YYYY-MM-DD</literal> format. 
     1237            Cette fonction reçoit la date <literal>dDate</literal> comme seul 
     1238            paramètre. Elle affichera la date sous la forme 
     1239            <literal>1999-01-18</literal>, c'est-à-dire dans le format 
     1240            <literal>YYYY-MM-DD</literal> format. 
    12301241       </para> 
    12311242      </listitem> 
     
    12361247      <listitem> 
    12371248       <para> 
    1238         Extract the values for the day, the month and the year from a variabl
    1239         of type date. 
     1249            Extrait les valeurs du jour, du mois et de l'année provenant d'un
     1250            variable de type date. 
    12401251<synopsis> 
    12411252void PGTYPESdate_julmdy(date d, int *mdy); 
    12421253</synopsis> 
    1243        <!-- almost same description as for rjulmdy() --> 
    1244         The function receives the date <literal>d</literal> and a pointer to an array 
    1245         of 3 integer values <literal>mdy</literal>. The variable name indicates 
    1246         the sequential order: <literal>mdy[0]</literal> will be set to contain the 
    1247         number of the month, <literal>mdy[1]</literal> will be set to the value of the 
    1248         day and <literal>mdy[2]</literal> will contain the year
     1254        <!-- almost same description as for rjulmdy() --> 
     1255            Cette fonction reçoit la date <literal>d</literal> et un pointeur vers 
     1256            un tableau de trois valeurs entières <literal>mdy</literal>. Le nom de 
     1257            la variable indique l'ordre de séquence&nbsp;: <literal>mdy[0]</literal> 
     1258            sera initialisé avec le numéro du mois, <literal>mdy[1]</literal> avec 
     1259            celui du jour et <literal>mdy[2]</literal> avec celui de l'année
    12491260       </para> 
    12501261      </listitem> 
     
    12551266      <listitem> 
    12561267       <para> 
    1257         Create a date value from an array of 3 integers that specify the 
    1258         day, the month and the year of the date. 
     1268            Crée une valeur date à partir d'un tableau de trois entiers qui précisent 
     1269            le jour, le mois et l'année de la date. 
    12591270<synopsis> 
    12601271void PGTYPESdate_mdyjul(int *mdy, date *jdate); 
    12611272</synopsis> 
    1262         The function receives the array of the 3 integers (<literal>mdy</literal>) as 
    1263         its first argument and as its second argument a pointer to a variabl
    1264         of type date that should hold the result of the operation. 
     1273            Cette fonction reçoit le tableau de trois entiers (<literal>mdy</literal>) 
     1274            en tant que premier argument et un pointeur vers une variable de type dat
     1275            dans son second argument qui recevra le résultat de l'opération. 
    12651276       </para> 
    12661277      </listitem> 
     
    12711282      <listitem> 
    12721283       <para> 
    1273         Return a number representing the day of the week for a date value. 
     1284        Renvoie un nombre représentant le jour de la semaine pour une valeur de 
     1285        type date. 
    12741286<synopsis> 
    12751287int PGTYPESdate_dayofweek(date d); 
    12761288</synopsis> 
    1277         The function receives the date variable <literal>d</literal> as its only 
    1278         argument and returns an integer that indicates the day of the week for 
    1279         this date. 
     1289            Cette fonction reçoit la variable <literal>d</literal> de type date 
     1290            comme seul argument et renvoie un entier indiquant le jour de la semaine 
     1291            pour cette date. 
    12801292        <itemizedlist> 
    12811293         <listitem> 
    12821294          <para> 
    1283            0 - Sunday 
    1284           </para> 
    1285          </listitem> 
    1286          <listitem> 
    1287           <para> 
    1288            1 - Monday 
    1289           </para> 
    1290          </listitem> 
    1291          <listitem> 
    1292           <para> 
    1293            2 - Tuesday 
    1294           </para> 
    1295          </listitem> 
    1296          <listitem> 
    1297           <para> 
    1298            3 - Wednesday 
    1299           </para> 
    1300          </listitem> 
    1301          <listitem> 
    1302           <para> 
    1303            4 - Thursday 
    1304           </para> 
    1305          </listitem> 
    1306          <listitem> 
    1307           <para> 
    1308            5 - Friday 
    1309           </para> 
    1310          </listitem> 
    1311          <listitem> 
    1312           <para> 
    1313            6 - Saturday 
     1295           0 - Dimanche 
     1296          </para> 
     1297         </listitem> 
     1298         <listitem> 
     1299          <para> 
     1300           1 - Lundi 
     1301          </para> 
     1302         </listitem> 
     1303         <listitem> 
     1304          <para> 
     1305           2 - Mardi 
     1306          </para> 
     1307         </listitem> 
     1308         <listitem> 
     1309          <para> 
     1310           3 - Mercredi 
     1311          </para> 
     1312         </listitem> 
     1313         <listitem> 
     1314          <para> 
     1315           4 - Jeudi 
     1316          </para> 
     1317         </listitem> 
     1318         <listitem> 
     1319          <para> 
     1320           5 - Vendredi 
     1321          </para> 
     1322         </listitem> 
     1323         <listitem> 
     1324          <para> 
     1325           6 - Samedi 
    13141326          </para> 
    13151327         </listitem> 
     
    13231335      <listitem> 
    13241336       <para> 
    1325         Get the current date. 
     1337        Récupère la date actuelle. 
    13261338<synopsis> 
    13271339void PGTYPESdate_today(date *d); 
    13281340</synopsis> 
    1329         The function receives a pointer to a date variable (<literal>d</literal>) 
    1330         that it sets to the current date. 
     1341            Cette fonction reçoit un pointeur vers une variable date 
     1342            (<literal>d</literal>) et l'initialise à la date actuelle. 
    13311343       </para> 
    13321344      </listitem> 
     
    13371349      <listitem> 
    13381350       <para> 
    1339         Convert a variable of type date to its textual representation using a 
    1340         format mask
     1351            Convertit une variable de type date en sa représentation textuelle en 
     1352            utilisant un masque de format
    13411353<synopsis> 
    13421354int PGTYPESdate_fmt_asc(date dDate, char *fmtstring, char *outbuf); 
    13431355</synopsis> 
    1344         The function receives the date to convert (<literal>dDate</literal>), the 
    1345         format mask (<literal>fmtstring</literal>) and the string that will hold the 
    1346         textual representation of the date (<literal>outbuf</literal>). 
    1347        </para> 
    1348        <para> 
    1349         On success, 0 is returned and a negative value if an error occurred. 
    1350        </para> 
    1351        <para> 
    1352         The following literals are the field specifiers you can use: 
     1356            Cette fonction reçoit la date à convertir (<literal>dDate</literal>), 
     1357            le masque de format (<literal>fmtstring</literal>) et la chaîne qui 
     1358            récupèrera la représentation textuelle de la date 
     1359            (<literal>outbuf</literal>). 
     1360       </para> 
     1361       <para> 
     1362        La fonction renvoie 0 en cas de succès et une valeur négative en cas 
     1363        d'erreur. 
     1364       </para> 
     1365       <para> 
     1366        Les chaînes suivantes indiquent les champs à utiliser&nbsp;: 
    13531367        <itemizedlist> 
    13541368         <listitem> 
    13551369          <para> 
    1356            <literal>dd</literal> - The number of the day of the month
    1357           </para> 
    1358          </listitem> 
    1359          <listitem> 
    1360           <para> 
    1361            <literal>mm</literal> - The number of the month of the year
    1362           </para> 
    1363          </listitem> 
    1364          <listitem> 
    1365           <para> 
    1366            <literal>yy</literal> - The number of the year as a two digit number
    1367           </para> 
    1368          </listitem> 
    1369          <listitem> 
    1370           <para> 
    1371            <literal>yyyy</literal> - The number of the year as a four digit number
    1372           </para> 
    1373          </listitem> 
    1374          <listitem> 
    1375           <para> 
    1376            <literal>ddd</literal> - The name of the day (abbreviated)
    1377           </para> 
    1378          </listitem> 
    1379          <listitem> 
    1380           <para> 
    1381            <literal>mmm</literal> - The name of the month (abbreviated)
     1370           <literal>dd</literal> - le numéro du jour dans le mois
     1371          </para> 
     1372         </listitem> 
     1373         <listitem> 
     1374          <para> 
     1375           <literal>mm</literal> - le numéro du mois dans l'année
     1376          </para> 
     1377         </listitem> 
     1378         <listitem> 
     1379          <para> 
     1380           <literal>yy</literal> - le numéro de l'année sur deux chiffres
     1381          </para> 
     1382         </listitem> 
     1383         <listitem> 
     1384          <para> 
     1385           <literal>yyyy</literal> - le numéro de l'année sur quatre chiffres
     1386          </para> 
     1387         </listitem> 
     1388         <listitem> 
     1389          <para> 
     1390           <literal>ddd</literal> - l'abréviation du nom du jour
     1391          </para> 
     1392         </listitem> 
     1393         <listitem> 
     1394          <para> 
     1395           <literal>mmm</literal> - l'abréviation du nom du mois
    13821396          </para> 
    13831397         </listitem> 
    13841398        </itemizedlist> 
    1385         All other characters are copied 1:1 to the output string
    1386        </para> 
    1387        <para> 
    1388         The following table indicates a few possible formats. This will give 
    1389         you an idea of how to use this function. All output lines are based o
    1390         the same date: November, 23rd, 1959. 
     1399            Tous les autres caractères sont copiés un à un dans la chaîne résultante
     1400       </para> 
     1401       <para> 
     1402            La table suivante indique quelques formats possibles. Ceci vous donnera 
     1403            des idées quant à l'utilisation de cette fonction. Toutes les lignes e
     1404            sortie sont basées sur la même date, le 23 novembre 1959. 
    13911405        <table> 
    1392          <title>Valid input formats for <function>PGTYPESdate_fmt_asc</function></title> 
     1406         <title>Formats valides en entrée de <function>PGTYPESdate_fmt_asc</function></title> 
    13931407         <tgroup cols="2"> 
    13941408          <thead> 
    13951409           <row> 
    1396             <entry>fmt</entry> 
    1397             <entry>result</entry> 
     1410            <entry>Format</entry> 
     1411            <entry>Résultat</entry> 
    13981412           </row> 
    13991413          </thead> 
     
    14581472      <listitem> 
    14591473       <para> 
    1460         Use a format mask to convert a C char* string to a value of typ
    1461         date. 
     1474            Utilise un masque de format pour convertir une chaîne C (char*) en un
     1475            valeur de type date. 
    14621476<synopsis> 
    14631477int PGTYPESdate_defmt_asc(date *d, char *fmt, char *str); 
    14641478</synopsis> 
    1465         <!-- same description as rdefmtdate --> 
    1466         The function receives a pointer to the date value that should hold the 
    1467         result of the operation (<literal>d</literal>), the format mask to use for 
    1468         parsing the date (<literal>fmt</literal>) and the C char* string containing 
    1469         the textual representation of the date (<literal>str</literal>). The textual 
    1470         representation is expected to match the format mask. However you do not 
    1471         need to have a 1:1 mapping of the string to the format mask. Th
    1472         function only analyzes the sequential order and looks for the literals 
    1473         <literal>yy</literal> or <literal>yyyy</literal> that indicate the 
    1474         position of the year, <literal>mm</literal> to indicate the position of 
    1475         the month and <literal>dd</literal> to indicate the position of th
    1476         day
    1477        </para> 
    1478        <para> 
    1479         The following table indicates a few possible formats. This will give 
    1480         you an idea of how to use this function. 
     1479            <!-- same description as rdefmtdate --> 
     1480            Cette fonction reçoit un pointeur vers la valeur de type date qui 
     1481            contiendra le résultat de l'opération (<literal>d</literal>), le masque 
     1482            du format à utiliser pour analyser la date (<literal>fmt</literal>) et 
     1483            la chaîne C contenant la représentation textuelle de la date 
     1484            (<literal>str</literal>). La représentation textuelle doit correspondre 
     1485            masque de format. Néanmoins, vous n'avez pas besoin d'avoir un
     1486            correspondance exacte. La fonction analyse seulement dans l'ordre 
     1487            séquentiel et cherche les constantes <literal>yy</literal> ou 
     1488            <literal>yyyy</literal> qui indiquent la position de l'année, 
     1489            <literal>mm</literal> pour la mois et <literal>dd</literal> pour l
     1490            jour
     1491       </para> 
     1492       <para> 
     1493            La table suivant indique quelques formats possibles. Ceci vous donnera 
     1494            des idées sur l'utilisation de cette fonction. 
    14811495        <table> 
    1482          <title>Valid input formats for <function>rdefmtdate</function></title> 
     1496         <title>Formats valides en entrée de <function>rdefmtdate</function></title> 
    14831497         <tgroup cols="2"> 
    14841498          <thead> 
    14851499           <row> 
    1486             <entry>fmt</entry> 
    1487             <entry>str</entry> 
    1488             <entry>result</entry> 
     1500            <entry>Format</entry> 
     1501            <entry>Chaîne</entry> 
     1502            <entry>Résultat</entry> 
    14891503           </row> 
    14901504          </thead> 
     
    15661580  
    15671581  <sect2> 
    1568    <title>The timestamp type</title> 
    1569    <para> 
    1570     The timestamp type in C enables your programs to deal with data of the SQL 
    1571     type timestamp. See <xref linkend="datatype-datetime"/> for the equivalent 
    1572     type in the <productname>PostgreSQL</productname> server. 
    1573    </para> 
    1574    <para> 
    1575     The following functions can be used to work with the timestamp type: 
     1582   <title>Type timestamp</title> 
     1583   <para> 
     1584    Le type timestamp en C active la gestion des données de type timestamp dans 
     1585    vos programmes. Voir <xref linkend="datatype-datetime"/> pour le type 
     1586    équivalent dans le serveur <productname>PostgreSQL</productname>. 
     1587   </para> 
     1588   <para> 
     1589    Le fonctions suivantes sont utilisées pour travailler avec le type 
     1590    timestamp&nbsp;: 
    15761591    <variablelist> 
    15771592     <varlistentry id="PGTYPEStimestampfromasc"> 
     
    15791594      <listitem> 
    15801595       <para> 
    1581         Parse a timestamp from its textual representation into a timestamp 
    1582         variable
     1596            Analyse une variable de type timestamp à partir de sa représentation 
     1597            textuelle et la stocke dans une variable de type timestamp
    15831598<synopsis> 
    15841599timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr); 
    15851600</synopsis> 
    1586         The function receives the string to parse (<literal>str</literal>) and a 
    1587         pointer to a C char* (<literal>endptr</literal>). 
    1588         At the moment ecpg always parses 
    1589         the complete string and so it currently does not support to store the 
    1590         address of the first invalid character in <literal>*endptr</literal>. 
    1591         You can safely set <literal>endptr</literal> to NULL. 
    1592        </para> 
    1593        <para> 
    1594         The function returns the parsed timestamp on success. On error, 
    1595         <literal>PGTYPESInvalidTimestamp</literal> is returned and errno is 
    1596         set to <literal>PGTYPES_TS_BAD_TIMESTAMP</literal>. See <xref linkend="PGTYPESInvalidTimestamp"/> for important notes on this value. 
    1597          
    1598        </para> 
    1599        <para> 
    1600         In general, the input string can contain any combination of an allowed 
    1601         date specification, a whitespace character and an allowed time 
    1602         specification. Note that timezones are not supported by ecpg. It can 
    1603         parse them but does not apply any calculation as the 
    1604         <productname>PostgreSQL</productname> server does for example. Timezone 
    1605         specificiers are silently discarded. 
    1606        </para> 
    1607        <para> 
    1608         The following table contains a few examples for input strings: 
     1601            Cette fonction reçoit la chaîne à analyser (<literal>str</literal>) et 
     1602            un pointeur vers une chaîne C de type char* (<literal>endptr</literal>). 
     1603            Actuellement, ecpg analyse toujours la chaîne complète et donc il ne 
     1604            supporte pas le stockage de l'adresse du premier caractère invalide 
     1605            dans <literal>*endptr</literal>. Vous pouvez initialiser 
     1606            <literal>endptr</literal> à NULL en toute sécurité. 
     1607       </para> 
     1608       <para> 
     1609        La fonction renvoie la variable de type timestamp analysée en cas de 
     1610        succès. En cas d'erreur, <literal>PGTYPESInvalidTimestamp</literal> est 
     1611        renvoyée et errno vaut <literal>PGTYPES_TS_BAD_TIMESTAMP</literal>. Voir 
     1612        <xref linkend="PGTYPESInvalidTimestamp"/> pour quelques informations 
     1613        importantes sur cette valeur. 
     1614       </para> 
     1615       <para> 
     1616            En général, la chaîne en entrée contient des combinaisons de spécification 
     1617            autorisée de dates, un espace blanc et une spécification autorisée 
     1618            d'heure. Notez que les fuseaux horaires ne sont pas supportés par ecpg. 
     1619            Il peut les analyser et n'applique aucun calcul comme le fait le serveur 
     1620            <productname>PostgreSQL</productname> par exemple. Les fuseaux horaires 
     1621            sont ignorés silencieusement. 
     1622       </para> 
     1623       <para> 
     1624        Le tableau suivant contient quelques exemples pour les chaînes en 
     1625        entrée&nbsp;: 
    16091626        <table> 
    1610          <title>Valid input formats for <function>PGTYPEStimestamp_from_asc</function></title> 
     1627         <title>Formats valides en entrée de <function>PGTYPEStimestamp_from_asc</function></title> 
    16111628         <tgroup cols="2"> 
    16121629          <thead> 
    16131630           <row> 
    1614             <entry>Input</entry> 
    1615             <entry>Result</entry> 
     1631            <entry>Entrée</entry> 
     1632            <entry>Résultat</entry> 
    16161633           </row> 
    16171634          </thead> 
     
    16271644           <row> 
    16281645            <entry><literal>1999-Jan-08 04:05:06.789-8</literal></entry> 
    1629             <entry><literal>1999-01-08 04:05:06.789 (time zone specifier ignored)</literal></entry> 
     1646            <entry><literal>1999-01-08 04:05:06.789 (fuseau horaire ignoré)</literal></entry> 
    16301647           </row> 
    16311648           <row> 
    16321649            <entry><literal>J2451187 04:05-08:00</literal></entry> 
    1633             <entry><literal>1999-01-08 04:05:00 (time zone specifier ignored)</literal></entry> 
     1650            <entry><literal>1999-01-08 04:05:00 (fuseau horaire ignoré)</literal></entry> 
    16341651           </row> 
    16351652          </tbody> 
     
    16441661      <listitem> 
    16451662       <para> 
    1646         Converts a date to a C char* string
     1663        Convertit une date en chaîne C char*
    16471664<synopsis> 
    16481665char *PGTYPEStimestamp_to_asc(timestamp tstamp); 
    16491666</synopsis> 
    1650         The function receives the timestamp <literal>tstamp</literal> as 
    1651         its only argument and returns an allocated string that contains the 
    1652         textual representation of the timestamp. 
     1667            Cette fonction reçoit la variable <literal>tstamp</literal> de type 
     1668            timestamp comme seul argument et renvoie une chaîne allouée contenant 
     1669            la représentation textuelle du timestamp. 
    16531670       </para> 
    16541671      </listitem> 
     
    16591676      <listitem> 
    16601677       <para> 
    1661         Retrieve the current timestamp
     1678        Récupère le timestamp actuel
    16621679<synopsis> 
    16631680void PGTYPEStimestamp_current(timestamp *ts); 
    16641681</synopsis> 
    1665         The function retrieves the current timestamp and saves it into the 
    1666         timestamp variable that <literal>ts</literal> points to
     1682            Cette fonction récupère le timestamp actuel et le sauvegarde dans la 
     1683            variable de type timestamp vers laquelle pointe <literal>ts</literal>
    16671684       </para> 
    16681685      </listitem> 
     
    16731690      <listitem> 
    16741691       <para> 
    1675         Convert a timestamp variable to a C char* using a format mask. 
     1692        Convertit une variable de type timestamp en une chaîne C de type char* 
     1693        en utilisant une masque de formatage. 
    16761694<synopsis> 
    16771695int PGTYPEStimestamp_fmt_asc(timestamp *ts, char *output, int str_len, char *fmtstr); 
    16781696</synopsis> 
    1679         The function receives a pointer to the timestamp to convert as its 
    1680         first argument (<literal>ts</literal>), a pointer to the output buffer 
    1681         (<literal>output</literal>), the maximal length that has been allocated for 
    1682         the output buffer (<literal>str_len</literal>) and the format mask to 
    1683         use for the conversion (<literal>fmtstr</literal>). 
    1684        </para> 
    1685        <para> 
    1686         Upon success, the function returns 0 and a negative value if an 
    1687         error occurred. 
    1688        </para> 
    1689        <para> 
    1690         You can use the following format specifiers for the format mask. The 
    1691         format specifiers are the same ones that are used in the 
    1692         <function>strftime</function> function in <productname>libc</productname>. Any 
    1693         non-format specifier will be copied into the output buffer.  
     1697           Cette fonction reçoit un pointeur vers la variable de type timestamp 
     1698           en premier argument (<literal>ts</literal>), un pointeur vers le tampon 
     1699           en sortie (<literal>output</literal>), la longueur maximale qui a été 
     1700           allouée pour le tampon en sortie (<literal>str_len</literal>) et le masque 
     1701           de formatage à utiliser pour la conversion (<literal>fmtstr</literal>). 
     1702       </para> 
     1703       <para> 
     1704            La fonction renvoie 0 en cas de succès et une valeur négative en cas 
     1705        d'erreur. 
     1706       </para> 
     1707       <para> 
     1708            Vous pouvez utiliser les caractères de formatage suivants pour le masque 
     1709            de formatage. Ces caractères sont identiques à ceux utilisés dans la 
     1710            fonction <function>strftime</function> de <productname>libc</productname>. 
     1711            Tout caractère n'en faisant pas partie sera copié tel quel dans le 
     1712            tampon de sortie. 
    16941713        <!-- This is from the FreeBSD man page: 
    16951714             http://www.freebsd.org/cgi/man.cgi?query=strftime&apropos=0&sektion=3&manpath=FreeBSD+7.0-current&format=html 
     
    16981717         <listitem> 
    16991718          <para> 
    1700            <literal>%A</literal> - is replaced by national representation of 
    1701            the full weekday name. 
    1702           </para> 
    1703          </listitem> 
    1704          <listitem> 
    1705           <para> 
    1706            <literal>%a</literal> - is replaced by national representation of 
    1707            the abbreviated weekday name. 
    1708           </para> 
    1709          </listitem> 
    1710          <listitem> 
    1711           <para> 
    1712            <literal>%B</literal> - is replaced by national representation of 
    1713            the full month name
    1714           </para> 
    1715          </listitem> 
    1716          <listitem> 
    1717           <para> 
    1718            <literal>%b</literal> - is replaced by national representation of 
    1719            the abbreviated month name
    1720           </para> 
    1721          </listitem> 
    1722          <listitem> 
    1723           <para> 
    1724            <literal>%C</literal> - is replaced by (year / 100) as decimal 
    1725            number; single digits are preceded by a zero. 
    1726           </para> 
    1727          </listitem> 
    1728          <listitem> 
    1729           <para> 
    1730            <literal>%c</literal> - is replaced by national representation of 
    1731            time and date. 
    1732           </para> 
    1733          </listitem> 
    1734          <listitem> 
    1735           <para> 
    1736            <literal>%D</literal> - is equivalent to 
     1719           <literal>%A</literal> - remplacé par la représentation nationale du nom 
     1720           complet du jour de la semaine. 
     1721          </para> 
     1722         </listitem> 
     1723         <listitem> 
     1724          <para> 
     1725           <literal>%a</literal> - remplacé par la représentation nationale de 
     1726           l'abréviation du nom de la semaine. 
     1727          </para> 
     1728         </listitem> 
     1729         <listitem> 
     1730          <para> 
     1731           <literal>%B</literal> - remplacé par la représentation nationale du nom 
     1732           complet du mois
     1733          </para> 
     1734         </listitem> 
     1735         <listitem> 
     1736          <para> 
     1737           <literal>%b</literal> - remplacé par la représentation nationale de 
     1738           l'abréviation du nom du mois
     1739          </para> 
     1740         </listitem> 
     1741         <listitem> 
     1742          <para> 
     1743           <literal>%C</literal> - remplacé par (année / 100) en tant que nombre 
     1744           décimal&nbsp;; les chiffres seuls sont précédés par un zéro. 
     1745          </para> 
     1746         </listitem> 
     1747         <listitem> 
     1748          <para> 
     1749           <literal>%c</literal> - remplacé par la représentation nationale de 
     1750           l'heure et de la date. 
     1751          </para> 
     1752         </listitem> 
     1753         <listitem> 
     1754          <para> 
     1755           <literal>%D</literal> - est équivalent à 
    17371756           <literal>%m/%d/%y</literal>. 
    17381757          </para> 
     
    17401759         <listitem> 
    17411760          <para> 
    1742            <literal>%d</literal> - is replaced by the day of the month as a 
    1743            decimal number (01-31). 
    1744           </para> 
    1745          </listitem> 
    1746          <listitem> 
    1747           <para> 
    1748            <literal>%E*</literal> <literal>%O*</literal> -  POSIX locale 
    1749            extensions. The sequences 
     1761           <literal>%d</literal> - est remplacé par le jour du mois en tant que 
     1762           nombre décimal (01-31). 
     1763          </para> 
     1764         </listitem> 
     1765         <listitem> 
     1766          <para> 
     1767           <literal>%E*</literal> <literal>%O*</literal> -  extensions POSIX de la 
     1768           locale. Les séquences 
    17501769           <literal>%Ec</literal> 
    17511770           <literal>%EC</literal>  
     
    17671786           <literal>%OW</literal>  
    17681787           <literal>%Oy</literal>  
    1769            are supposed to provide alternate representations. 
    1770           </para>