Обсуждение: AW: Fix for tablename in targetlist
> True, although there's a certain inconsistency in allowing a whole row > to be passed to a function by > > select foo(pg_class) from pg_class; > > and not allowing the same row to be output by Imho there is a big difference between the two. The foo(pg_class) calls a function with argument type opaque or type pg_class. I would go so far as to say, that above foo function call would have a different meaning if written with 'pg_class.*'. select foo(pg_class.*) from pg_class; Could be interpreted as calling a function foo with pg_class ncolumns arguments of the corresponding types. > > select pg_class from pg_class; Probably a valid interpretation would be if type pg_class or opaque had an output function. Andreas
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes: >> select pg_class from pg_class; > Probably a valid interpretation would be if type pg_class or opaque had an > output function. Hmm, good point. We shouldn't foreclose the possibility of handling things that way. Okay, I'm convinced: allowing .* to be omitted isn't a good idea. regards, tom lane
> Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes: > >> select pg_class from pg_class; > > > Probably a valid interpretation would be if type pg_class or opaque had an > > output function. > > Hmm, good point. We shouldn't foreclose the possibility of handling > things that way. Okay, I'm convinced: allowing .* to be omitted isn't > a good idea. > OK, old patch causing an elog being added now. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026