Re: [GENERAL] optimize pg_tables query ( text vs varchar ) ...why ? - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] optimize pg_tables query ( text vs varchar ) ...why ?
Date
Msg-id 24525.1502896851@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] optimize pg_tables query ( text vs varchar ) ...why ?  (gmb <gmbouwer@gmail.com>)
Responses Re: [GENERAL] optimize pg_tables query ( text vs varchar ) ...why ?  (gmb <gmbouwer@gmail.com>)
List pgsql-general
gmb <gmbouwer@gmail.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


pgsql-general by date:

Previous
From: gmb
Date:
Subject: Re: [GENERAL] optimize pg_tables query ( text vs varchar ) ...why ?
Next
From: gmb
Date:
Subject: Re: [GENERAL] optimize pg_tables query ( text vs varchar ) ...why ?