Re: optimize pg_tables query ( text vs varchar ) ...why ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: gmb <gmbouwer(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: optimize pg_tables query ( text vs varchar ) ...why ?
Date: 2017-08-16 15:20:51
Message-ID: 24525.1502896851@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

gmb <gmbouwer(at)gmail(dot)com> writes:
> Tom Lane-2 wrote
>> Personally I'd have left the function parameters as text and inserted
>> explicit coercions:

> Just out of curiosity , is there a reason why this will be you preference ?

Well, if the rest of your code thinks that table names are of type text
(which is reasonable, as most of what you might want to do with them
would be better served by text), then it seems like you want to keep
this odd catalog interaction isolated within the function rather than
advertise it in the function's API.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message gmb 2017-08-16 17:15:38 Re: optimize pg_tables query ( text vs varchar ) ...why ?
Previous Message gmb 2017-08-16 14:58:27 Re: optimize pg_tables query ( text vs varchar ) ...why ?