473,785 Members | 2,987 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.000000 000 -0800
--- initdb.sh 2004-02-11 11:28:35.000000 000 -0800
***************
*** 608,615 ****
--- 608,620 ----
fi
cp "$PG_IDENT_SAMP LE" "$PGDATA"/pg_ident.conf || exit_nicely

+ cp "$PGDATA"/pg_ident.conf "$PGDATA"/pg_ident.conf.d efault || exit_nicely
+ cp "$PGDATA"/pg_hba.conf "$PGDATA"/pg_hba.conf.def ault || 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.def ault "$PGDATA"/pg_ident.conf.d efault \
+ "$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 1335
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.ph a.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.c om> 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_iso lation | read committed | override
transaction_rea d_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 YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 22 '05 #4

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

Similar topics

21
8652
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 filename.endswith(('.jpg','.jpeg','.gif','.png')): print "This is a valid image file" Currently this is not valid Python and I must use the ugly if filename.endswith('.jpg') or filename.endswith('.jpeg') \
16
2145
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 may be of some interest. To refresh your memory, I report here some quotation from that thread. Jacek Generowicz: > I sumbit to you that read-only closures are rare in Python because > they are a recent addition to the language.
3
3746
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" does not exist createdb: database creation failed" will pop up. Why?
1
1586
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 template1. On the second machine (Linux), "postgres" is pgsql's main superuser. On whatever machines I do "createdb", the owner of the schemas in template0/1 is copied over to the schemas in the new database, even when specifying the owner parameter...
30
3319
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, 'abc', '12345') # demonstrate map's None fill-in feature The motivation is to provide a means for looping over all data elements
12
2095
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 fill-in feature The movitation is to provide a means for looping over all data elements when the input lengths are unequal. The question of the day is whether that is both a common need and a good approach to real-world problems. The answer to...
4
1467
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 project. It would be very useful for me (and probably others too) because I use this feature to generate my properties from my member variables. So I type all my member variables and then take them one by one and encapsulate them... When the project...
25
2591
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 example: with quitCommandButton .enabled = true .default = true end with
5
8207
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 createdb command using the following command from another batch file "createdb -U dbname username"
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10327
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10151
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8973
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.