Re: [SQL] Encrytion in postgres field in table

2008-07-28 Thread Lennin Caro
use md5 function in a trigger when insert data or see this link http://www.postgresql.org/docs/8.3/static/pgcrypto.html --- On Mon, 7/28/08, Chris Preston <[EMAIL PROTECTED]> wrote: > From: Chris Preston <[EMAIL PROTECTED]> > Subject: [SQL] Encrytion in postgres field in table > To: pgsql-sql@

Re: [SQL] Query prepared plan

2008-07-28 Thread Alvaro Herrera
Emi Lu wrote: > Similar to \dt to show all tables, within one session, may I know the > command to list all prepared query plan please? select * from pg_prepared_statements; -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt,

Re: [SQL] PERSISTANT PREPARE (another point of view)

2008-07-28 Thread Milan Oparnica
chester c young wrote: Session #1 has search_path=schema1 Session #2 has search_path=schema2 if session #1 attempts to exec stmt, it prepare and use schema1 if session #2 attempts to use stmt, if prepared globally, disaster I'm sorry, I wasn't precise enough. When I said global I meant

Re: [SQL] Query prepared plan

2008-07-28 Thread Emi Lu
Tom Lane wrote: Emi Lu <[EMAIL PROTECTED]> writes: Somebody know about how to find prepared query plan through command line? PREPARE fooplan(...) EXPLAIN EXECUTE fooplan(...) Thank you Tom. Similar to \dt to show all tables, within one session, may I know the command to lis

Re: [SQL] Encrytion in postgres field in table

2008-07-28 Thread Andrej Ricnik-Bay
On 29/07/2008, Chris Preston <[EMAIL PROTECTED]> wrote: > How do I setup a password table that I only want to encrypt 1 field > "password" http://www.postgresql.org/docs/8.3/interactive/pgcrypto.html -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.

Re: [SQL] Accessing array datatype

2008-07-28 Thread maria s
Hi Oliveiros, Thanks for your reply and I am sorry I didn't notice that I missed pgsql email id. Yes, the solution that you stated is what I am going to do. First query to get the number of elements in the array, then fetch the elements by building a query. I am also using C# and I guess this may

Re: [SQL] Accessing array datatype

2008-07-28 Thread Oliveiros Cristina
Maria, Could you explain a little more the background? What kind of output do you actually want? .Do you need to retrieve all the arrays in that column in just one query? Or just need to get one with a particular ID? I learned bout the existence of arrays a few days ago :-) If I had this prob

Re: [SQL] Accessing array datatype

2008-07-28 Thread Oliveiros Cristina
Maria, You mean your array has a variable size, which you need to know in order to properly construct a query? Dunno much about arrays, but here http://www.postgresql.org/docs/8.3/static/arrays.html is said that array_upper( your_array, 1 ) returns the upper bound of the array... Can this be

[SQL] Accessing array datatype

2008-07-28 Thread maria s
Hi All, I have an array column in a table. How can I fetch the elements separately( ie, select arr[1],arr[2]...arr[n]) as a column, when I don't know how many elements are there in the array? Thanks for your help. Maria

[SQL] Encrytion in postgres field in table

2008-07-28 Thread Chris Preston
How do I setup a password table that I only want to encrypt 1 field "password"