Re: [GENERAL] running postgresql database from loopback filesystem?

2004-04-09 Thread William White
Jeff Davis wrote: Anyway, it occured to me that I could create a special file for each database user of limited size, and make a filesystem on top of that file. The file could be owned by the user. Then, each user could have a seperate database and that database would be at the location of the moun

[GENERAL] running postgresql database from loopback filesystem?

2004-04-09 Thread Jeff Davis
I have virtual hosted users on a server and some of them have a postgresql database. I'm concerned about the outside possibility that a user could create an infinite loop and fill up the partition on which everyone's database resides. Anyway, it occured to me that I could create a special file fo

Re: [GENERAL] Data Encryption in PostgreSQL, and a Tutorial.6

2004-04-09 Thread Mike Nolan
> Has anyone created something like that for Postgresql? It would be > really handy to encrypt credit card numbers and other information so > it stays secure. Is there some reason you can't use contrib/pgcrypto? I use it for storing passwords in an MD5 encryption and credit card data using encr

Re: [GENERAL] Select/Group by/Order by question

2004-04-09 Thread Mike Nolan
> How about: > > select to_char(mtrantime,'mm-dd hh AM') as datetime, > to_char(mtrantime,'AM') as sort_field, > count(*) as tot from memtran > group by sort_field, datetime > order by sort_field, datetime; > > Then ignore the sort_field column? I usually don't like to send

Re: [GENERAL] Data Encryption in PostgreSQL, and a Tutorial.

2004-04-09 Thread Christopher Browne
In an attempt to throw the authorities off his trail, "T. Relyea" <[EMAIL PROTECTED]> transmitted: > MySQL has encryption and decryption functions built in, doesn't Postgresql? But of course. See the "pgcrypto" contrib module in the source tree. It is not typically compiled into what gets distr

Re: [GENERAL] Data Encryption in PostgreSQL, and a Tutorial.

2004-04-09 Thread Joshua D. Drake
Hello, Actually I would use psql with the \e option. This would allow you to do what you suggest but also allow you to stay within psql while you debug your statements. Then when you are all done and you have used the appropriate amount of COMMENT ON statements, you can just do a pg_dump -s and

[GENERAL] Accented chars in several apps

2004-04-09 Thread G. Brannon Smith
I have a personal database of my books, several of which are French with accented characters in their titles. However I am getting inconsistent display of the accent characters depending on the app I am using to access the DB. When the accents show up OK in psql and phpPgAdmin, they look like g

Re: [GENERAL] Select/Group by/Order by question

2004-04-09 Thread Michael Fork
How about: select to_char(mtrantime,'mm-dd hh AM') as datetime, to_char(mtrantime,'AM') as sort_field, count(*) as tot from memtran group by sort_field, datetime order by sort_field, datetime; Then ignore the sort_field column? Michael "Mike Nolan" <[EMAIL PROTECTED]> wrote

Re: [GENERAL] Accented chars in several apps

2004-04-09 Thread G. Brannon Smith
Answering my own post. I went ahead and bit the bullent and dumped the whole thing over to ENCODING = 'UNICODE'. Wasn't nearly as painful as I thought it would be... although I guess the DB has now effectively doubled in size. G. Brannon Smith wrote: I have a personal database of my books, seve

Re: [GENERAL] Date Comparison Help

2004-04-09 Thread Brian C. Doyle
Perfect and thank you so much for the swift response; At 04:23 PM 4/8/2004, Mike Nolan wrote: > I need a query to get data that is 6 months older than "today" or when that > query is run. WHERE table.date < current_date-interval'6 months' -- Mike Nolan   Brian C. Doyle Director, In

[GENERAL] Data Encryption in PostgreSQL, and a Tutorial.

2004-04-09 Thread Mike Cox
Has anyone created something like that for Postgresql? It would be really handy to encrypt credit card numbers and other information so it stays secure. If no one has created anything such as this, I am going to code up something quite soon, but if it already exists, there is no need for me to re

Re: [GENERAL] Why would query return PGRES_NONFATAL_ERROR?

2004-04-09 Thread Scott Ribe
> In 7.3 there is only one use of PGRES_NONFATAL_ERROR, and it's this: > > ExecStatusType > PQresultStatus(const PGresult *res) > { > if (!res) > return PGRES_NONFATAL_ERROR; > return res->resultStatus; > } > > So what you're seeing is a NULL PGresult pointer. (7.4 uses > PGRES_FATAL_ERROR for t

Re: [GENERAL] Why would query return PGRES_NONFATAL_ERROR?

2004-04-09 Thread Tom Lane
Scott Ribe <[EMAIL PROTECTED]> writes: > I'm using 7.3.2, invoke a small stored procedure via PQexec, and > PQresultStatus returns PGRES_NONFATAL_ERROR. I can find nothing in the docs > to help me understand what could cause this, and PQresultErrorMessage is > blank. Hmm ... PGRES_NONFATAL_ERROR i