1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

elog mop-up.

This commit is contained in:
Tom Lane
2003-07-27 17:10:07 +00:00
parent aeea73d4ec
commit e8db9b26d0
18 changed files with 62 additions and 63 deletions

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/xtypes.sgml,v 1.17 2003/04/10 01:22:45 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/xtypes.sgml,v 1.18 2003/07/27 17:10:06 tgl Exp $
-->
<sect1 id="xtypes">
@ -70,14 +70,15 @@ typedef struct Complex {
Complex *
complex_in(char *str)
{
double x, y;
Complex *result;
double x,
y;
Complex *result;
if (sscanf(str, " ( %lf , %lf )", &amp;x, &amp;y) != 2)
{
elog(ERROR, "complex_in: error in parsing %s", str);
return NULL;
}
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for complex: \"%s\"", str)));
result = (Complex *) palloc(sizeof(Complex));
result-&gt;x = x;
result-&gt;y = y;