Hi, everyone, and the previous videos we have seen, the system information functions to look at the
is the metadata and couple of other things as well.
Now, in this video, we're going to see using this system, administration function, administration
function.
These are the function that is used or help you to look at your system from the more administrative
perspective.
So let's look at it, a couple of them.
These are, I would call it, more of a configuration functions.
So, for example, if I wanted to look at what is the current time zone information in your database
server that we can use to select current settings, we took current settings and then we provide the
parameter inside time zone.
So let's run that.
And this will give you that.
I am in America in New York time zone.
OK, and you can always change this to anything as well.
So for example, from SD, you want to do devices or you want to send this one to any other location
that is Singapore, Singapore, or you want to do it in any other country, NCDOT here as well, that
you can do that.
To do that, by the way, is you can use this set config function.
So we have a current setting gives you the current settings.
The set underscore config function is to set the time zone, etc..
For example, if you want to select, if you want to set the time zone, let's say to SD, then I will
just say select set config time zone.
I'll provide the time zone, whatever the configuration that I'm looking at the parameter.
So I say that I'm interested to set times on and I'm going to say I want this to be Estie and I'll say
yes, Bolian as in true.
And this will set the time zone to Estie over there.
So set config is also available for you to kind of set the configuration as well.
The second thing that we want to also look at it over here is all the different file access function.
So Postgres has a pretty powerful way to look at the file accesses availability.
You can look at the stats.
You can look at the content of the file and everything as well.
So we're going to look at it, let's say, some of the sample files or into the server directory.
You have an ATC, etc., and then you have aliases as a file.
So the page is that file will help you to look at the stats of the files.
I'm going to just run.
That's like BGN to score stat on the score, file and bracket.
I'll provide the location of the file and let's run it.
And this will give you the all the PD stats over here, the different information coming up.
This is in what would you call like in a this is the idea of the file.
This is when the file was access and last X's and when it was created and et cetera, et cetera.
And there are other parameters over here as well.
Now, let's suppose if you want to read the content of the file, like PJI underscores that file, we
have a PJI underscore, read, file.
OK, so select PD and the score read file and then let's just provide the same ATC aliases over here
and I'm going to run that and this will give you the content of the file.
So I mean, this has every information that is inside in that particular file over here.
As you can see, I just use my mouse this hover on it and just leave it over there.
And this will give you the quick content information over here as well.
Now, these function can be used when you are dealing in functions and procedures whereby you need to
access particular file.
This can be like I've seen people using this for looking at the directory information on Amazon s three
to read the files from there and see when the files are there any content and et cetera, et cetera.
But to be very frank with you, there are other commercial version or other better file read content
functionality available.
I mean, I am a super fan of you all, but at the same time, I think Python is probably my choice for
any of the file eye operations over here as well.
But I just wanted to show you that for a quick handy tool.
Yes, you can read the content of the file using the underscore read file.
So another command is to look at the list of content of the directory over here.
And just like that.
So we have a PDF and the scores, as you can see, a Wikipedia, the score always start with some functions
and over here to Swedien or else is for a less and easier and less largely use of the Unix type of directory
and convention over here.
And it's saying that give me the directory for a particular directory name.
So I'll just say this quotation slash temp.
So select pedia underscore lsn this Cordia TMP will give you a quick list of all the files which is
in your temp directly of the server.
So these are all the different files that.
It's been created by the postcrisis girls server over here, so pretty handy to board, i.e. the configuration
functions as well as a quick file access function, and then we call them more of a system administration
function and there are tons of them.
And that is available in postcrisis skill that you can always view from the mean documentation table
and documentation website of PostgreSQL.