Tuesday, October 28, 2008

PgSQL: random notes


postgres, allow localhost with no password
/var/lib/pgsql/pg_hba.conf
on line: with host all all 127.0.0.1/32 md5
change md5 to trust

postgres, set new password
[user@server ~]psql -U postgres -h localhost -d postgres
ALTER USER postgres WITH PASSWORD 'newpass';

#where postgres is the dbname
pgsql -U postgres -d dbname

# (at pgsql prompt) this will give the schema of the table
dbname=# \d tablename

# (at pgsql prompt) view autoincrement expression for field
dbname=# \d tablename

# (at pgsql prompt) how to view next autoincrement number
dbname=# select nextval('tablename_fieldname_seq');

# (at pgsql prompt) how to set autoincrement number
dbname=# select setval('tablename_fieldname_seq', 50);






source(s): http://www.source.com

Thursday, October 16, 2008

Linux - New set of Notes

I just installed Fedora, and I'll be making some notes about setting up and configuring Fedora 8 in this post.

this is a system startup script kind of like the old autoexec.bat
/etc/rc.local

this is a bash startup script for that user, also an .sh
/home/username/.bash_profile

defaults for new users
/etc/skel/.bash_profile

CTRL-ALT-D
show desktop

FC8:
System > Preferences > Personal > Keyboard Shortcuts
CTRL-ALT <arrow> (l,r,u,d) to navigate between desktops