Tuesday, October 28, 2008

PgSQL: random notes

postgres, allow localhost with no password
on line: with host all all 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

this is a bash startup script for that user, also an .sh

defaults for new users

show desktop

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