Re: [SQL] How to store a password encripted in a user defined table
On 3/1/07, Eugenio Flores <[EMAIL PROTECTED]> wrote: Hello, I wonder if somebody knows how to store passwords in a column that is part of a user defined table. Assuming that your passwords are application specific use a sha1 or md5 algorithm (depending on how sensitive your data is) and store that in a varchar or char field. When the user authenticates the password gets hashed in the app and compared against the stored hash. Cheers, Andrej ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [SQL] SHA-1 vs MD5
On 3/8/07, Andrew Sullivan <[EMAIL PROTECTED]> wrote: What is the problem you're trying to solve? Md5 is probably good enough for many cases, but for long-term use, you're right that sha-1 is what you need. Actually, you need sha-256, quite frankly. Looking at his last mail he's after a password hash. To the OP: Currently there's no support in pg for sha algorithms, but you could always implement those in your application and store the hash in pg that way. Cheers, Andrej ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [SQL] postgres configuration
On 3/14/07, Sumeet <[EMAIL PROTECTED]> wrote: Hi All, Hi, Sorry if this is the wrong list to ask this question. General woould have been better :) My Vacuum's are running very very slow and expecially when vacuuming indexes in large tables of size in 5-10 gigabytes, can some one help me determine the parameters for postgres.conf which will help me vacuum fast. I'm running postgres on a server with 32 gigs of ram and 8 processors. And the disk subsystem is ? Thanks, Sumeet. Cheers, Andrej ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate
Re: [SQL] Issue with copying data from a text file.
On 3/20/07, Paul Lambert <[EMAIL PROTECTED]> wrote: The source file comes from extracts on our main application which sits inside an in-house pretending-to-be-a-dbms file system. The content of these extracts would be difficult to change - the extract program would need to parse the data looking for quotes and preceed them with the necessary escape character. Not being a proper database dump it's not a simple matter of flicking a switch to get it to include the escape character. The way the extracts are written would require a few dozen lines of code to each extract, and theres about 40ish extracts. Plus I don't maintain that side of our code, and those that do can be a bit lazy and I'd likely be waiting months to get it done - if they even decide to do it. Pipe it through sed and replace the Carets with TABS? sed 's/^/\t/g' c:/temp/autodrs_deal_lines.txt > c:/temp/autodrs_deal_lines.tab Then use copy like so: \copy table from 'c:/temp/autodrs_deal_lines.tab' delimiter E'\t' null '' Cheers, Andrej ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [SQL] We all are looped on Internet: request + transport = invariant
On 4/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Problem consist of transportation data, received by SQL, into external world. As i already wrote, it's very difficalt for users (in practice) to use libraries of additional language (php , perl, etc) for that. I offer to put one feature into SQL to avoid mentioned libraries. And you offer latex and all other kind of things, too? That's the whole issue: you don't understand. SQL is for information retrieval, presentation thereof is and should (for a clean design) be independent of the retrieval. There's already a highly popular database out there that breaks and "enhances" standards. And there are tools available that will take tabular textual data and convert it into other file formats; no need to turn postgres into an egg-laying wool-bearing milk-sow. ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate
Re: [SQL] need help
On 5/14/07, Penchalaiah P. <[EMAIL PROTECTED]> wrote: Any one can help in this Operating system? Postgres version? How does psql behave? Anything in the logs? Cheers, Andrej ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [SQL] yet another simple SQL question
On 6/27/07, Michael Glaesemann <[EMAIL PROTECTED]> wrote: While self-admittedly grumpy, I believe John was trying to encourage better posting behavior from Joshua which will benefit him by receiving more answers. If John had remained silent (as I'm sure others who share his sentiment have), being (apparently) new, Joshua probably wouldn't know he's potentially limiting the number of answers he'd receive. Perhaps John could have phrased his email differently, but I think he was trying to help Joshua. Which makes this a fine opportunity to post the admirable http://www.catb.org/~esr/faqs/smart-questions.html :) -- Cheers, Andrej Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.htm ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate
Re: [SQL] yet another simple SQL question
On 7/2/07, John Summerfield <[EMAIL PROTECTED]> wrote: Andrej: I don't post links; I often find them unhelpful because I can't read them at the time I'm reading email. esr's article contains good advice, but there's room for argument on some of his points. Probably, not everyone will agree with me on Which_ points:-) I guess that's quite likely ... after all, there's humans who aren't ESR reading ;} involved ... I, too, think that a few points might need alteration, but over all I think it's quite valid; and it definitely offers some food for thought, and I believe it nudges people into the direction of at least AWARENESS of netiquette on varied lists. Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.htm ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [SQL] linux
On 7/12/07, Mohd Ghalib Akhtar <[EMAIL PROTECTED]> wrote: how to download linux 7.3 image file(means os) ? Please, for the sake of people who use mailing systems that support threading start a new mail for a new topic. Don't just respond to one you spotted and change the subject. Highly irritating. Cheers, Andrej ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [SQL] Converting from MS Access field aliases
On 7/13/07, Nis Jørgensen <[EMAIL PROTECTED]> wrote: Don't attribute to malice what can be adequately explained by incompetence. He didn't :) Nis Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.htm ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [SQL] Restricting columns by users
On 8/8/07, Ranieri Mazili <[EMAIL PROTECTED]> wrote: > Exist something like it for postgresql? I thought that's what views are for > Thanks Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.htm ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [SQL] Extracting hostname from URI column
On 9/12/07, Paul Lambert <[EMAIL PROTECTED]> wrote: > > substring( href from '.*://\([^/]*)' ); > Ok, your solution looks better than mine... but I have no idea how to > interpret that, time to consult some manuals. Plain regex The key are the parenthesis () ... basically it will omit ANYTHING + two slashes at the beginning of a string. Then it will match everything BUT a slash, and as much of that as possible since regex are greedy by default (hence the host name he was looking for) ... and everything AFTER a slash will be omitted. Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.htm ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
[SQL] Extract interdependent info from one table
Hi Guys, I can't quite wrap my head around this one ... I have \d docmaster Table "public.docmaster" Column | Type | Modifiers ++--- alias1 | integer| alias2 | character varying(25) | subclass_alias | character varying(25) | docnum | integer| not null version| integer| docname| character varying(255) | Indexes: "docmaster_docnum_key" UNIQUE, btree (docnum) with the following data: # select * from docmaster ; alias1 | alias2 | subclass_alias | docnum | version | docname +---+++-+- 3589 | Completed | Inquiry| 653218 | 1 | My greater doc2 3587 | Pending | Post | 653216 | 3 | My great doc1 3588 | Draft | Reply | 653217 | 1 | My great doc2 3587 | Draft | Reply | 653219 | 2 | My greater doc4 (4 rows) Now I want to find inquiries (subclass_alias = 'Inquiry'), list their status and also (if there's another row that a) has the same alias1, a subclass of Reply and a status (alias2) of pending or redraft how do I achieve this? What I have is select docnum, alias1, alias2, subclass_alias from docmaster where (alias1 = ( select alias1 from docmaster where subclass_alias = 'Post' and ( alias2 = 'Pending' or alias2 = 'Redraft' ))) and ( alias2 = 'Pending' or alias2 = 'Draft' ) and subclass_alias <> 'Post' ; docnum | alias1 | alias2 | subclass_alias ++-+ 653219 | 3587 | Redraft | Reply (1 row) What I'd really like is to BOTH Post AND reply, with the alias2 for both. Hope this was as clear as mud? :) Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.htm ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [SQL] Extract interdependent info from one table
On 25/01/2008, Phillip Smith <[EMAIL PROTECTED]> wrote: > Absolutely clear as mud :P sorry ... I'm not too good with expressing my SQL needs, I'm afraid, Thanks for trying :} In the end I got it sorted with the following select dm.docnum, dm.alias1, dm.docname, dm.alias2 as "Status", dm2.alias2 as "Reply" from docmaster as dm left outer join ( select alias1, subclass_alias, alias2, entrywhen from docmaster where subclass_alias in ('Reply','MinTR') and alias2 in ('PENDING','COMPLETED') ) as dm2 on dm2.alias1 = dm.alias1 where dm.subclass_alias='Post' and alias2 in ('PENDING','REDRAFT'); Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.htm ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [SQL] select across two database
On 17/06/2008, Jorge Medina <[EMAIL PROTECTED]> wrote: > hi guys. > I want know if it's possible create a select from 2 database or create > a view in one of them. The short answer is no. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
Re: [SQL] Encrytion in postgres field in table
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.american.edu/econ/notes/htmlmail.htm -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql