[SQL] CREATE TEMPORARY TABLE ON COMMIT DROP

2005-09-14 Thread Luis Sousa
ar "ON" at character 60. Thanks in advance for you answers. Luis Sousa ---(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] Problem in age on a dates interval

2004-07-20 Thread Luis Sousa
Yes, that's a much more clever solution than the one I used. Thanks Best regards, Luis Sousa Alexander M. Pravking wrote: On Mon, Jul 19, 2004 at 10:00:50AM +0100, Luis Sousa wrote: I worked around this problem returning the difference between the two dates, using extract doy from both. A

Re: [SQL] Problem in age on a dates interval

2004-07-19 Thread Luis Sousa
I worked around this problem returning the difference between the two dates, using extract doy from both. Anyway, this will cause a bug on my code when changing the year. Any ideas? Best regards, Luis Sousa Tom Lane wrote: Theodore Petrosky <[EMAIL PROTECTED]> writes: wow at f

[SQL] Problem in age on a dates interval

2004-07-16 Thread Luis Sousa
0 Here, the age between 2004-05-26 16:00 and 2004-02-18 16:00 is 3 mons 8 days, and this interval added to the initial date gives the correct result!! Best regards, Luis Sousa ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [SQL] Database diagram

2004-01-20 Thread Luis Sousa
analyze is your friend Did you already tried dia? I never used it, but someone told me that imports data definition from PostgreSQL. You can try it. Luis Sousa smime.p7s Description: S/MIME Cryptographic Signature

[SQL] Setuid functions

2003-07-08 Thread Luis Sousa
Hi all, How can I set a function as setuid ? I take a look at the documetation, on Reference Manual and the only reference I saw to it was on SET SESSION AUTHORIZATION. Thanks in advance. Luis Sousa ---(end of broadcast)--- TIP 4: Don't &#x

Re: [SQL] plpgsql recursion

2003-05-28 Thread Luis Sousa
Can you post the recursion function that you use on this case to get out the information from the table ? Thanks, Luis Sousa Stefano Vita Finzi wrote: Greetings! I have a table like: node parent 1 2 2 3 3 4 Since i traverse this table with a recursive function, i want to

Re: [SQL] SQL query help!

2002-11-27 Thread Luis Sousa
Tell me what did you try with limit and group by. Where's IN, why don't you use EXISTS instead. It runs much master ! Regards, Luis Sousa Arcadius A. wrote: Hello! I hope that someone here could help. I'm using PostgreSQL7.1.3 I have 3 tables in my DB: the tables are

Re: [SQL] trying to learn plpqsql... so please forgive..

2002-11-20 Thread Luis Sousa
When I do an 'INSERT INTO VALUES ' and on the table is a serial primary key named p_key. As I want this number to be auto-generated, but use it as a 'customer number', I want to create this function to return the value of this insert. Try this: SELECT currval(); Luis

Re: [SQL] Problems invoking psql. Help please.

2002-11-20 Thread Luis Sousa
biko:/usr/bin# psql -U postgres No database specified Instead, do: su - postgres Then do: psql template1 or psql -h template1 My pg_hba.conf temporarily reads: local all trust host all 127.0.0.1 255.255.255.255 trust host template1 192.168.2.21 255.255.255.0 trust For now, just remove

Re: [SQL] Problems invoking psql. Help please.

2002-11-19 Thread Luis Sousa
again dpkg --purge. Luis Sousa Hugh Esco wrote: I have reinstalled before. I wonder though, how I ensure that I have cleanly un-installed it first, so that I leave no residue from the previously botched installation around to mess things up the next time. -- Hugh Esco At 09:03 AM 11/19/02

Re: [SQL] Problems invoking psql. Help please.

2002-11-19 Thread Luis Sousa
m lane I agree with Tom Lane. Probably is the best thing to do. When you install all it over, in theory, all the problems will solve by them selfs. Luis Sousa smime.p7s Description: S/MIME Cryptographic Signature

Re: [SQL] Problems invoking psql. Help please.

2002-11-18 Thread Luis Sousa
Hi there, I'm using debian woody. If you post your configuration files that are in /etc/postgresql/ maybe i can help you. Regards, Luis Sousa Hugh Esco wrote: Hey folks: I am able to consistently start and stop the postgreSQL server and to access it across our office network with pgAdm

Re: [SQL] Permission on insert rules

2002-11-13 Thread Luis Sousa
Tom Lane wrote: Luis Sousa <[EMAIL PROTECTED]> writes: When inserting, using the rule, the insert that's defined on the rule works fine, but the insert defined inside the function, doesn't (that's the one that gives permssion denied). Right. As of 7.3 you can f

Re: [SQL] Permission on insert rules

2002-11-13 Thread Luis Sousa
quot;=1: -- Rule definition CREATE RULE "pessoalInfo_r_insert" AS ON INSERT TO "pessoalInfo_v" DO INSTEAD ( INSERT INTO pessoal (titulo,nome) VALUES (NEW.titulo,NEW.nome); INSERT INTO "pessoalGabinete" ("idPessoal",edificio,sala) VALUES (1,

Re: [SQL] Permission on insert rules

2002-11-12 Thread Luis Sousa
See the online docs, under Server Programming, for how to use the RULES system. That's what I already made. The problem is when I do the update, I permission denied in all the tables for update and insert. The user that's making this operation only have select privilege. Any way

Re: [SQL] Permission on insert rules

2002-11-12 Thread Luis Sousa
t the only way to do it ? Luis Sousa smime.p7s Description: S/MIME Cryptographic Signature

Re: [SQL] Permission on insert rules

2002-11-12 Thread Luis Sousa
!! (those operations that are executed on rules) Luis Sousa smime.p7s Description: S/MIME Cryptographic Signature

[SQL] Permission on insert rules

2002-11-08 Thread Luis Sousa
But I got permission denied on those tables. The idea was to create a layer, with the views, giving to that user permission on views to insert and update, and not to tables. Is this possible ? Thanks in advance. Luis Sousa smime.p7s Description: S/MIME Cryptographic Signature

[SQL] Executing RECORD's inside a FUNCTION

2001-07-13 Thread Luis Sousa
Hello I have a function with a field record named 'starting'. Now I want to use starting in a query. Is it possible ? I use it with a simple join inside the query a I got the message that table starting is not defined !!! Best Regards Luis Sousa ---(end of

[SQL] Rule ON DELETE, to perform to DELETE querys !

2001-06-08 Thread Luis Sousa
of you How can i do this Thanks Luis Sousa ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] Hidden Select

2001-06-08 Thread Luis Sousa
fields in the view so it could be possible to restrict that data Best Regards Luis Sousa ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

[SQL] Reading array's of integer in plpg/SQL

2001-06-05 Thread Luis Sousa
>From pg_group, it's possible to return the users that are in that group. How can in put the values in that array of integer to an array ?? Using plpg/SQL, how can i access to the array of integers ??? Best Regards Luis Sousa ---(end of b

[SQL] Use of INNER JOIN and others ??!?

2001-01-24 Thread Luis Sousa
Is it possible to use the statements INNER JOIN, OUTER JOIN, LEFT JOIN and RIGHT JOIN in the new version of PostgreSQL 7.1 ? Luis Sousa