473,395 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

createdb feature request

Apache has a nice feature: it creates copies of all the default
configuration files, so that it's easy to diff and see what has
been modified in the config files.

Can this be included in createdb as well?

Thanks,
Mark

Here's a patch:
*** initdb.sh-orig 2004-02-11 11:25:49.000000000 -0800
--- initdb.sh 2004-02-11 11:28:35.000000000 -0800
***************
*** 608,615 ****
--- 608,620 ----
fi
cp "$PG_IDENT_SAMPLE" "$PGDATA"/pg_ident.conf || exit_nicely

+ cp "$PGDATA"/pg_ident.conf "$PGDATA"/pg_ident.conf.default || exit_nicely
+ cp "$PGDATA"/pg_hba.conf "$PGDATA"/pg_hba.conf.default || exit_nicely
+ cp "$PGDATA"/postgresql.conf "$PGDATA"/postgresql.conf.default || exit_nicely
chmod 0600 "$PGDATA"/pg_hba.conf "$PGDATA"/pg_ident.conf \
"$PGDATA"/postgresql.conf
+ chmod 0600 "$PGDATA"/pg_hba.conf.default "$PGDATA"/pg_ident.conf.default \
+ "$PGDATA"/postgresql.conf.default

echo "ok"
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 22 '05 #1
3 1318
Mark Harrison wrote:
Apache has a nice feature: it creates copies of all the default
configuration files, so that it's easy to diff and see what has
been modified in the config files.

Can this be included in createdb as well?


Uh, the defaults are already in /pgsql/share.

--
Bruce Momjian | http://candle.pha.pa.us
pg***@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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #2
On Wednesday 11 February 2004 19:49, Mark Harrison wrote:
Apache has a nice feature: it creates copies of all the default
configuration files, so that it's easy to diff and see what has
been modified in the config files.

Can this be included in createdb as well?


Postfix has a useful utility called "postconf"
postconf => display all settings
postconf foo => display setting foo
postconf -n => display non-standard config settings
Other stuff too, see http://www.postfix.org/postconf.1.html

Standard procedure for problems on the postfix list is to ask for "postconf
-n" output before anything else.
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 22 '05 #3
Richard Huxton <de*@archonet.com> writes:
Postfix has a useful utility called "postconf"
postconf => display all settings
postconf foo => display setting foo
postconf -n => display non-standard config settings
Other stuff too, see http://www.postfix.org/postconf.1.html Standard procedure for problems on the postfix list is to ask for "postconf
-n" output before anything else.


Hmm. The SQL-ish way to do this would be

select name, setting, source from pg_settings
where setting != default_value;

The compiled-in default value for each GUC variable is available in the
GUC data structure, but pg_settings doesn't currently expose it.
Possibly we should add that.

You can almost do it today with

select name, setting, source from pg_settings
where source != 'default';

but this clutters the output a little with values that have been
explicitly set but are still equal to the default. For instance,
I get

regression=# select name, setting, source from pg_settings
regression-# where source != 'default';
name | setting | source
-----------------------+----------------+----------------------
fsync | off | command line
lc_collate | C | override
lc_ctype | C | override
lc_messages | C | database
lc_monetary | C | database
lc_numeric | C | database
lc_time | C | database
max_connections | 100 | configuration file
server_encoding | SQL_ASCII | override
shared_buffers | 1000 | configuration file
tcpip_socket | on | command line
TimeZone | EST5EDT | environment variable
transaction_isolation | read committed | override
transaction_read_only | off | override
(14 rows)

Not sure if it's worth any work to shorten that.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Michele Simionato | last post by:
I often feel the need to extend the string method ".endswith" to tuple arguments, in such a way to automatically check for multiple endings. For instance, here is a typical use case: if...
16
by: Michele Simionato | last post by:
I have read with interest the recent thread about closures. The funny thing is that the authors are arguing one against the other but I actually agree with all of them and I have a proposal that...
3
by: Dr. Azmir | last post by:
Hi there I'm Dr. Azmir from Kuala Lumpur. I'm using RH 9.0 with postgresql intalled in it. My problem is I can't createuser and createdb with it. The error message "psql: FATAL: user "name"...
1
by: CSN | last post by:
I have two machines between which I exchange dumps a lot. On the first (Windows/cygwin), pgsql was set up with "Administrator" as the main superuser - who owns all schemas in template0 and...
30
by: Raymond Hettinger | last post by:
Proposal -------- I am gathering data to evaluate a request for an alternate version of itertools.izip() with a None fill-in feature like that for the built-in map() function: >>> map(None,...
12
by: Raymond Hettinger | last post by:
I am evaluating a request for an alternate version of itertools.izip() that has a None fill-in feature like the built-in map function: >>> map(None, 'abc', '12345') # demonstrate map's None...
4
by: ThunderMusic | last post by:
Hi, Is there a way we can send a feature request for Visual Studio? When using 'Refactor-->Encapsulate Field', I'd like to have an option for the references not to be updated anywhere in the...
25
by: samjnaa | last post by:
Please check for sanity and approve for posting at python-dev. In Visual Basic there is the keyword "with" which allows an object- name to be declared as governing the following statements. For...
5
by: anand4nk | last post by:
Hi, I am installing postgreSQL 8.2 using batch files in windows xp machine. I am installing postgres using postgresql-8.2.msi installer. Installation was successful. When i tried to run...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.