pgstattuple for schemas

Started by Rod Taylorabout 23 years ago9 messagespatches
Jump to latest
#1Rod Taylor
rbt@rbt.ca

Using a table name requires that the table be in the current search
path, which for single use might be fine but not for an interface.

Add a pgstattuplebyid(oid) function.

Also, qualify DUMMY_TUPLE (reference to Type) since we cannot guarentee
that public is in the search path. Assume installation script installs
to public, which it already did.

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachments:

stattuple.patchtext/x-patch; charset=ISO-8859-1; name=stattuple.patchDownload+57-23
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rod Taylor (#1)
Re: pgstattuple for schemas

Rod Taylor <rbt@rbt.ca> writes:

Using a table name requires that the table be in the current search
path, which for single use might be fine but not for an interface.

Actually, it requires no such thing, because the code is already
schema-aware -- you can do pgstattuple('foo.bar').

Add a pgstattuplebyid(oid) function.

Perhaps this is worth having, but not for the reason given above.

regards, tom lane

#3Rod Taylor
rbt@rbt.ca
In reply to: Tom Lane (#2)
Re: pgstattuple for schemas

On Fri, 2003-05-23 at 09:15, Tom Lane wrote:

Rod Taylor <rbt@rbt.ca> writes:

Using a table name requires that the table be in the current search
path, which for single use might be fine but not for an interface.

Actually, it requires no such thing, because the code is already
schema-aware -- you can do pgstattuple('foo.bar').

heh.. didn't even think of trying that (obviously).

Add a pgstattuplebyid(oid) function.

Perhaps this is worth having, but not for the reason given above.

This is a much easier form to deal with in code. If it can be added for
that reason, it would be appreciated.

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

#4Bruce Momjian
bruce@momjian.us
In reply to: Rod Taylor (#3)
Re: pgstattuple for schemas

I have updated the pgstattuple readme with this TODO item. Does anyone
have the patch mentioned to implement this?

---------------------------------------------------------------------------

Rod Taylor wrote:
-- Start of PGP signed section.

On Mon, 2003-06-02 at 16:16, Bruce Momjian wrote:

Added to pgstattuple README:

TODO: Allow pgstattuple to accept oids.

There is a patch in that thread for this...

I'd find it but -archives seems to be having issues at the moment.
--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#5Rod Taylor
rbt@rbt.ca
In reply to: Bruce Momjian (#4)
Re: pgstattuple for schemas

On Wed, 2003-06-04 at 17:47, Bruce Momjian wrote:

I have updated the pgstattuple readme with this TODO item. Does anyone
have the patch mentioned to implement this?

Attached

---------------------------------------------------------------------------

Rod Taylor wrote:
-- Start of PGP signed section.

On Mon, 2003-06-02 at 16:16, Bruce Momjian wrote:

Added to pgstattuple README:

TODO: Allow pgstattuple to accept oids.

There is a patch in that thread for this...

I'd find it but -archives seems to be having issues at the moment.
--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

-- End of PGP section, PGP failed!

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachments:

stattuple.patchtext/x-patch; charset=ISO-8859-1; name=stattuple.patchDownload+57-23
#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rod Taylor (#5)
Re: pgstattuple for schemas

Rod Taylor <rbt@rbt.ca> writes:

CREATE OR REPLACE FUNCTION pgstattuple(text) RETURNS pgstattuple_type
AS 'MODULE_PATHNAME', 'pgstattuple'
! LANGUAGE 'c' STRICT;
!=20
! CREATE OR REPLACE FUNCTION pgstattuple(oid) RETURNS pgstattuple_type
! AS 'MODULE_PATHNAME', 'pgstattuple'
! LANGUAGE 'c' STRICT;

Surely not.

regards, tom lane

#7Rod Taylor
rbt@rbt.ca
In reply to: Tom Lane (#6)
Re: pgstattuple for schemas

Surely not.

New patch with corrected README attached.

Also quickly added mention that it may be a qualified schema name.

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachments:

stattuple.patchtext/x-patch; charset=ISO-8859-1; name=stattuple.patchDownload+61-27
#8Bruce Momjian
bruce@momjian.us
In reply to: Rod Taylor (#7)
Re: pgstattuple for schemas

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Rod Taylor wrote:
-- Start of PGP signed section.

Surely not.

New patch with corrected README attached.

Also quickly added mention that it may be a qualified schema name.

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#9Bruce Momjian
bruce@momjian.us
In reply to: Rod Taylor (#7)
Re: pgstattuple for schemas

Patch applied. Thanks.

---------------------------------------------------------------------------

Rod Taylor wrote:
-- Start of PGP signed section.

Surely not.

New patch with corrected README attached.

Also quickly added mention that it may be a qualified schema name.

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073