FW: Patch for current_schemas to optionally include implicit schemas
I posted this a few days ago - I think it must have got lost somewhere
:-(
Show quoted text
-----Original Message-----
From: Dave Page
Sent: 03 June 2002 20:09
To: pgsql-patches@postgresql.org
Cc: 'Tom Lane'
Subject: Patch for current_schemas to optionally include
implicit schemasFollowing my discussion with Tom on -hackers a while ago
about finding the full schema search path, I decided to give
it a go myself and hopefully both learn something, and give
Tom one less thing to do!Attached is the result which seems to work OK here. The
existing current_schemas() works as previously, & I have
added current_schemas(bool) which will return the full
implicit/explicit path if passed true or the explicit path is
pass false.Thorough checking is advised in case I've done something
nasty or missed something I was unaware of (being my first
venture into the backend code) :-)Regards, Dave.
Attachments:
current_schemas.diffapplication/octet-stream; name=current_schemas.diffDownload+4-2
Your patch has been added to the PostgreSQL unapplied patches list at:
http://candle.pha.pa.us/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
---------------------------------------------------------------------------
Dave Page wrote:
I posted this a few days ago - I think it must have got lost somewhere
:-(-----Original Message-----
From: Dave Page
Sent: 03 June 2002 20:09
To: pgsql-patches@postgresql.org
Cc: 'Tom Lane'
Subject: Patch for current_schemas to optionally include
implicit schemasFollowing my discussion with Tom on -hackers a while ago
about finding the full schema search path, I decided to give
it a go myself and hopefully both learn something, and give
Tom one less thing to do!Attached is the result which seems to work OK here. The
existing current_schemas() works as previously, & I have
added current_schemas(bool) which will return the full
implicit/explicit path if passed true or the explicit path is
pass false.Thorough checking is advised in case I've done something
nasty or missed something I was unaware of (being my first
venture into the backend code) :-)Regards, Dave.
Content-Description: current_schemas.diff
[ Attachment, skipping... ]
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
--
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, Pennsylvania 19026
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Your patch has been added to the PostgreSQL unapplied patches list at:
http://candle.pha.pa.us/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
I believe I objected to that one... we need something like it but
Dave's first cut wasn't right.
regards, tom lane
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 14 June 2002 06:25
To: Bruce Momjian
Cc: Dave Page; pgsql-patches@postgresql.org
Subject: Re: [PATCHES] FW: Patch for current_schemas to
optionally include implicitBruce Momjian <pgman@candle.pha.pa.us> writes:
Your patch has been added to the PostgreSQL unapplied
patches list at:
http://candle.pha.pa.us/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.I believe I objected to that one... we need something like it
but Dave's first cut wasn't right.
Second cut attached. This one just adds a boolean option to the existing
function to indicate that implicit schemas are to be included (or not).
I remembered the docs as well this time :-)
BTW: Tom, I noticed that temp schemas get added to the path before
pg_catalog - I would have expected pg_catalog to always be first or have
I missed something obvious?
Regards, Dave.
Attachments:
current_schemas.patchapplication/octet-stream; name=current_schemas.patchDownload+16-16
Import Notes
Resolved by subject fallback
"Dave Page" <dpage@vale-housing.co.uk> writes:
BTW: Tom, I noticed that temp schemas get added to the path before
pg_catalog - I would have expected pg_catalog to always be first or have
I missed something obvious?
It's open to debate I suppose. Past releases allow you to create and
use a temp table named the same as a system catalog, so I maintained
that behavior.
regards, tom lane
"Dave Page" <dpage@vale-housing.co.uk> writes:
I believe I objected to that one... we need something like it=20
but Dave's first cut wasn't right.
Second cut attached. This one just adds a boolean option to the existing
function to indicate that implicit schemas are to be included (or not).
I remembered the docs as well this time :-)
This looks good --- but Bruce, when you apply it don't forget to bump
catversion.h.
regards, tom lane
This patch is returned for further work/review.
---------------------------------------------------------------------------
Dave Page wrote:
I posted this a few days ago - I think it must have got lost somewhere
:-(-----Original Message-----
From: Dave Page
Sent: 03 June 2002 20:09
To: pgsql-patches@postgresql.org
Cc: 'Tom Lane'
Subject: Patch for current_schemas to optionally include
implicit schemasFollowing my discussion with Tom on -hackers a while ago
about finding the full schema search path, I decided to give
it a go myself and hopefully both learn something, and give
Tom one less thing to do!Attached is the result which seems to work OK here. The
existing current_schemas() works as previously, & I have
added current_schemas(bool) which will return the full
implicit/explicit path if passed true or the explicit path is
pass false.Thorough checking is advised in case I've done something
nasty or missed something I was unaware of (being my first
venture into the backend code) :-)Regards, Dave.
Content-Description: current_schemas.diff
[ Attachment, skipping... ]
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
--
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, Pennsylvania 19026
Your patch has been added to the PostgreSQL unapplied patches list at:
http://candle.pha.pa.us/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
---------------------------------------------------------------------------
Dave Page wrote:
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 14 June 2002 06:25
To: Bruce Momjian
Cc: Dave Page; pgsql-patches@postgresql.org
Subject: Re: [PATCHES] FW: Patch for current_schemas to
optionally include implicitBruce Momjian <pgman@candle.pha.pa.us> writes:
Your patch has been added to the PostgreSQL unapplied
patches list at:
http://candle.pha.pa.us/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.I believe I objected to that one... we need something like it
but Dave's first cut wasn't right.Second cut attached. This one just adds a boolean option to the existing
function to indicate that implicit schemas are to be included (or not).
I remembered the docs as well this time :-)BTW: Tom, I noticed that temp schemas get added to the path before
pg_catalog - I would have expected pg_catalog to always be first or have
I missed something obvious?Regards, Dave.
Content-Description: current_schemas.patch
[ Attachment, skipping... ]
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
--
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, Pennsylvania 19026
Tom Lane wrote:
"Dave Page" <dpage@vale-housing.co.uk> writes:
I believe I objected to that one... we need something like it=20
but Dave's first cut wasn't right.Second cut attached. This one just adds a boolean option to the existing
function to indicate that implicit schemas are to be included (or not).
I remembered the docs as well this time :-)This looks good --- but Bruce, when you apply it don't forget to bump
catversion.h.
Yep, thanks, got it. Hold, do we need to bump catversion for changes
that add new functionality, or just ones that make the system broken
without it? Would this break an existing installation?
--
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, Pennsylvania 19026
Bruce Momjian <pgman@candle.pha.pa.us> writes:
This looks good --- but Bruce, when you apply it don't forget to bump
catversion.h.
Yep, thanks, got it. Hold, do we need to bump catversion for changes
that add new functionality, or just ones that make the system broken
without it? Would this break an existing installation?
Yes, because the catalog entry for current_schemas wouldn't match the C
code.
regards, tom lane
Patch applied. Thanks.
Catversion updated. initdb required, as mentioned by Tom Lane.
---------------------------------------------------------------------------
Dave Page wrote:
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 14 June 2002 06:25
To: Bruce Momjian
Cc: Dave Page; pgsql-patches@postgresql.org
Subject: Re: [PATCHES] FW: Patch for current_schemas to
optionally include implicitBruce Momjian <pgman@candle.pha.pa.us> writes:
Your patch has been added to the PostgreSQL unapplied
patches list at:
http://candle.pha.pa.us/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.I believe I objected to that one... we need something like it
but Dave's first cut wasn't right.Second cut attached. This one just adds a boolean option to the existing
function to indicate that implicit schemas are to be included (or not).
I remembered the docs as well this time :-)BTW: Tom, I noticed that temp schemas get added to the path before
pg_catalog - I would have expected pg_catalog to always be first or have
I missed something obvious?Regards, Dave.
Content-Description: current_schemas.patch
[ Attachment, skipping... ]
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
--
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, Pennsylvania 19026