Re: [SQL] SHA-1 vs MD5

2007-03-08 Thread Ezequias Rodrigues da Rocha
I really don't have the pgcrypto. It could be a nice alternative. Could you tell me the steps to install it ? I am very concerned about security in my application becouse we are going to moviment a large ammount of information and money. As much i take care of it as good. I know some problem of

Re: [SQL] SHA-1 vs MD5

2007-03-08 Thread Chad Wagner
On 3/8/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote: I really don't have the pgcrypto. It could be a nice alternative. Could you tell me the steps to install it ? This should help you out: http://www.postgresql.org/docs/8.2/static/external-extensions.html http://developer.postgr

[SQL] A form of inheritance with PostgreSQL

2007-03-08 Thread Greg Toombs
Hello. I'm trying to figure out how to nicely implement a C++ class-like system with PostgreSQL. Consider the following: Tables Fruit, Apple, Orange I want to design the foreign key scheme such that there are relations between fruit and apple, and fruit and orange, that imply that apple is a

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-08 Thread Richard Huxton
Greg Toombs wrote: Hello. I'm trying to figure out how to nicely implement a C++ class-like system with PostgreSQL. Consider the following: Don't do a lot of this myself, but I do know that there are several object-relational mappers that do this sort of stuff for you. Might be worth a bit

Re: [SQL] A form of inheritance with PostgreSQL

2007-03-08 Thread Richard Broersma Jr
> I want to design the foreign key scheme such that there are relationsbetween > fruit and apple, and fruit and orange, that imply that apple isa fruit, > and orange is a fruit. Sometime in the future, you will be able to achieve this beautifully and easily using postgresql's feature known as tab

Re: [SQL] inheritance

2007-03-08 Thread chester c young
> --- Greg Toombs <[EMAIL PROTECTED]> wrote: > > > I'm trying to figure out how to nicely implement a C++ class-likesystem > > with PostgreSQL. Consider the following: > > Tables Fruit, Apple, Orange you can do this traditionally or through pg inheritance, although I do not think inheritance is w

Re: [SQL] inheritance

2007-03-08 Thread Shane Ambler
chester c young wrote: --- Greg Toombs <[EMAIL PROTECTED]> wrote: I'm trying to figure out how to nicely implement a C++ class-likesystem > > with PostgreSQL. Consider the following: Tables Fruit, Apple, Orange you can do this traditionally or through pg inheritance, although I do not think

Re: [SQL] inheritance

2007-03-08 Thread Richard Broersma Jr
> > Maybe then you'll add a table basket that has a foreign key to the fruit > table... ;-) >From the inheritance link: ... A serious limitation of the inheritance feature is that indexes (including unique constraints) and foreign key constraints only apply to single tables, not to their in

Re: [SQL] inheritance

2007-03-08 Thread chester c young
--- Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > > > > Maybe then you'll add a table basket that has a foreign key to the > fruit > > table... ;-) > > From the inheritance link: > ... > A serious limitation of the inheritance feature is that ... it's my understanding that inheritance h

Re: [SQL] inheritance

2007-03-08 Thread Richard Broersma Jr
> > it's my understanding that inheritance has become much stronger in 8.2, > although it still only inherits parts of the table. True. But from what I understand, the only new feature that was added to table-inheritance was the ability to ALTER a table so that it inherits another table. Befor

[Re: [SQL] PRIMARY KEY]

2007-03-08 Thread Phillip Smith
If you actually need to know the value of N_GEN in your ASP application, you will need to query the database first and select the NEXTVAL from the sequence that the "serial" data type will create, then use that returned value in your insert - ie, DON'T exclude it from the insert, otherwise it will

[SQL] View Vs. Table

2007-03-08 Thread Radhika Sambamurti
Hi, I have two tables which currently are being aggregated into a third table. I am proposing eliminating or drastically shortening the 3rd aggregation table, and instead just using a View. Which brings me to the question, which is better? Reading from a table or a view or is there a difference i

[SQL] Select when table have missing data

2007-03-08 Thread Lars Gregersen
I have a table that contains historical exchange rates: date_time | timestamp xrate | real There is a maximum of one entry per day, but data are missing on weekends and holidays. For these missing dates I must use the value from the previous day (e.g. since data for a Sunday is missing I must

Re: [SQL] inheritance

2007-03-08 Thread Shane Ambler
Richard Broersma Jr wrote: Maybe then you'll add a table basket that has a foreign key to the fruit table... ;-) From the inheritance link: ... A serious limitation of the inheritance feature is that indexes (including unique constraints) and foreign key constraints only apply to single

Re: [SQL] Select when table have missing data

2007-03-08 Thread Rodrigo De León
On 2 Mar 2007 01:17:33 -0800, Lars Gregersen <[EMAIL PROTECTED]> wrote: I have a table that contains historical exchange rates: date_time | timestamp xrate | real There is a maximum of one entry per day, but data are missing on weekends and holidays. For these missing dates I must use the va

[SQL] Creating views

2007-03-08 Thread Kashmira Patel \(kupatel\)
Hi all, Is it possible to create views that take parameters? Basically, I have to create some very complex historical reports, and as of now I am using temporary tables to store intermediate query results. I calculate values based on the content of these temporary tables and use them in the f