Re: Proposal for resolving casting issues

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Proposal for resolving casting issues
Date: 2002-09-17 07:33:34
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA4961E88@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> What I will do instead is adjust parse_coerce.c so that a
> length-coercion function can have either of the signatures
> foo(foo,int4) returns foo
> or
> foo(foo,int4,bool) returns foo
> and then modify the above-mentioned length coercion functions to provide
> the desired behavior. This has no direct impact on pg_cast because we
> do not use pg_cast for length-coercion functions.

Sounds good to me.

When those are really truncated ESQL/C needs to set a warning in sqlca.sqlwarn
though, thus I think the second signature should also have an output flag to tell
whether truncation actually occurred.
Maybe this should be kept for a protocol change though, since I would not think
a NOTICE would be suitable here.

Andreas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2002-09-17 07:33:35 Re: PGXLOG variable worthwhile?
Previous Message Shridhar Daithankar 2002-09-17 06:37:24 Re: Physical sites handling large data