Garfield Lewis <garfield.le...@lzlabs.com> writes: > I think you are right in the case of INPUT/RECEIVE, however we should be able > to get that info during OUTPUT/SEND (I think) since it is fixed at that > point. At the time I return the information to the user I could augment the > output to add that information to the output. However, I still don't know if > it is even possible to get that information in those functions. Is that at > all possible?
No, it's the same problem in reverse: the output function cannot know where the value came from. There is no hard and fast reason that it must have come out of a table, either. Consider something as simple as SELECT 'blah blah'::yourtype; This'll invoke the type's input function to parse the literal string, and later it'll invoke the output function to reconstruct a string to send to the client, and there's no table involved. regards, tom lane