[SQL] Storing encrypted data?

2006-07-16 Thread John Tregea
Hi, Does anyone have experience with storing encrypted data into pgSQL? I have a pgSQL database which uses UTF8 encoding. I am encrypting plain text in my (GUI) application and sending it to a field (with data type 'text') in my database. I get an error back saying "invalid byte sequence fo

Re: [SQL] Storing encrypted data?

2006-07-16 Thread John Tregea
type of my field from text to bytea (I am using PGADMIN III). Do you know why? Regards John T Michael Fuhr wrote: On Mon, Jul 17, 2006 at 09:11:12AM +0800, John Tregea wrote: Does anyone have experience with storing encrypted data into pgSQL? I have a pgSQL database which uses UTF8 encoding

Re: [SQL] Storing encrypted data?

2006-07-19 Thread John Tregea
ohn T Aaron Bono wrote: On 7/17/06, *John Tregea* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Hi Michael, Thanks for your advice. I was looking at the bytea data type in the PostgreSQL book I bought (Korry and Susan Douglas, second edition). I was concern

Re: [SQL] Storing encrypted data?

2006-07-20 Thread John Tregea
Hi Aaron, I removed them because when I bring the data back into my GUI, the returns are treated as a record break by the software and I cannot decrypt them or display the rest of the record that is not encrypted. Regards John T Aaron Bono wrote: On 7/19/06, *John Tregea* <[EMAIL PROTEC

[SQL] Joining a result set from four (4) tables

2006-07-31 Thread John Tregea
Hi, Can anyone help me with the following? I am setting up a series of permissions of my own making in pgSQL 8.1.4. I have the following tables; resource -- a list of available resources actions -- the actions available to the user policies -- the actions that are allowed to be performed on i

Re: [SQL] Joining a result set from four (4) tables

2006-07-31 Thread John Tregea
Hi aaron, Here are the 'create table' statements. I have indicated what are the primary and foreign keys with trailing comments. Thanks John Aaron Bono wrote: Can you include the table create statements with primary and foreign keys? That would help a lot. CREATE TABLE resources ( seria

Re: [SQL] Joining a result set from four (4) tables

2006-08-01 Thread John Tregea
Hi Aaron, Thanks very much, I really appreciate both the solution and the advice about naming conventions. Your script worked fine and gives me an example of what to do for other situations as well. Because the logic structure of this software is in the front end application rather than the

Re: [SQL] Joining a result set from four (4) tables

2006-08-02 Thread John Tregea
Hi Aaron, The query builder to generate joins that you mentioned is exactly what I am going to do doing this time. That is one of the reasons I have the generic field names for the primary and foreign key fields. Then I only have to pass the search criteria the table names and which direction