Patch for current_schemas to optionally include implicit schemas

Started by Dave Pageabout 24 years ago3 messagespatches
Jump to latest
#1Dave Page
dpage@pgadmin.org

Following 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
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dave Page (#1)
Re: Patch for current_schemas to optionally include implicit schemas

"Dave Page" <dpage@vale-housing.co.uk> writes:

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.

This patch will break the existing current_schemas() function AFAICS;
the code will be testing a value that it wasn't passed, and getting a
random result, so it's unclear which behavior you'd get.

Since current_schemas() isn't in any released code yet, it's not by
any means set in stone. I'd be willing to simply change it to take a
boolean parameter always. Comments anyone?

regards, tom lane

#3Dave Page
dpage@pgadmin.org
In reply to: Tom Lane (#2)
Re: Patch for current_schemas to optionally include implicit schemas

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 09 June 2002 20:46
To: Dave Page
Cc: pgsql-patches@postgresql.org
Subject: Re: Patch for current_schemas to optionally include
implicit schemas

"Dave Page" <dpage@vale-housing.co.uk> writes:

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.

This patch will break the existing current_schemas() function
AFAICS; the code will be testing a value that it wasn't
passed, and getting a random result, so it's unclear which
behavior you'd get.

Ahh, I was unaware of that - too used to VB & C# where booleans default
to false I suppose...

Since current_schemas() isn't in any released code yet, it's
not by any means set in stone. I'd be willing to simply
change it to take a boolean parameter always. Comments anyone?

Fine with me.

Regards, Dave.