Re: [GENERAL] Log en Postgresql 8.1.11

2009-03-02 Thread Fernando Moreno
El día 2 de marzo de 2009 18:14, Angelo Astorga escribió: > Trabajo con postgresql 7.3.4 y el log se guarda en el dir > .../data/serverlog, ahora que utilizo postgresql 8.1.11 no encuentro donde > guarda el log, alguna ayuda de como generar archivo log de postgresql... > > aastorga Esta es la lis

Re: [GENERAL] when to use "execute" in plpgsql?

2009-02-27 Thread Fernando Moreno
Hi, check this out: http://archives.postgresql.org/pgsql-general/2008-05/msg00938.php I would say that execute is the only way to achieve some things related to schemas and temp tables. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: ht

Re: [GENERAL] foxpro, odbc, data types and unnecessary convertions

2009-02-27 Thread Fernando Moreno
Thank you very much for your advice, I guess I'm wasting my time in this 'problem'. I'm going to check that class, it seems pretty useful. And by the way...yes, this is a born-dead app (at least on the client side) and it's likely to be ported to .NET in the future, but like I said before, it's not

[GENERAL] foxpro, odbc, data types and unnecessary convertions

2009-02-25 Thread Fernando Moreno
Hi all, I'm using visual foxpro 9 -not my decision- for a client application. Statements are writen as the typical sql string and sent through ODBC. For numbers, I have to convert them first to string and then remove the spaces, the code looks like this: sql_string = "some sql" + alltrim( str( som

Re: [GENERAL] Array in nested query

2009-02-14 Thread Fernando Moreno
What error are you getting? I tried your query and I had to add an explicit cast to smallint[] to make it work. Like this: ... a.attnum = any ((select conkey FROM pg_catalog.pg_constraint WHERE > oid = 3708025)::smallint[]); It seems strange to me, I didn't expect the ANY clause to need that cas

Re: [GENERAL] Saber cuando se dispara el trigger (After: insert,update,delete)

2009-02-11 Thread Fernando Moreno
Hola, no olvides que esta es la lista de correo para usuarios de habla inglesa. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How do I turn on query logger?

2009-02-06 Thread Fernando Moreno
Check out the "log_statement" option in the postgresql.conf file (there's an entire section (18.7) in the docs about logging). -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] backup and permissions

2008-11-13 Thread Fernando Moreno
Hello Scott, thanks for your answer. I've just noticed that my first message lacked some important info. First, this is an accounting software, and there's only one database. Almost all of the options (buttons, generally ) are stored in a set of tables, beside the database privileges needed to wor

[GENERAL] backup and permissions

2008-11-13 Thread Fernando Moreno
Hi, I'm working on a little backup utility for a desktop application. It's going to execute pg_dumpall (-r) and pg_dump, but first I have to deal with the permissions needed to do that: 1. Users (pgsql roles) enabled to backup would be superusers all the time. This sounds insecure. 2. Users will

Re: [GENERAL] triggers problems whit function

2008-10-22 Thread Fernando Moreno
2008/10/22 Ma. Cristina Peña C. <[EMAIL PROTECTED]> > I want to use a function in to a trigger > > > > This is my > > CREATE FUNCTION "subradio"(integer) RETURNS integer AS 'select cast(count > (claveubica) as integer ) from asradios where ubicacion =0;' LANGUAGE 'sql'; > > > > And my ttrigger is

Re: [GENERAL] Using a variable as tablename ins plpgsql?

2008-10-20 Thread Fernando Moreno
2008/10/20 Glyn Astill <[EMAIL PROTECTED]> > Hi people, > > Hopefully this is a quickie, I want to pass in a table name to a plpgsql > function and then use that table name in my queries. > > Is EXECUTE the only way to do this? > As far as I know, yes. That's the only way to create queries using

Re: [GENERAL] db_user_namespace, md5 and changing passwords

2008-10-14 Thread Fernando Moreno
2008/10/7 Alvaro Herrera <[EMAIL PROTECTED]> > Bruce Momjian escribió: > > > Well, I posted about this in August with no one replying: > > > > http://archives.postgresql.org/pgsql-admin/2008-08/msg00068.php > > > > Basically, there is a mismatch between what libpq and the backend think > > i

[GENERAL] db_user_namespace, md5 and changing passwords

2008-10-04 Thread Fernando Moreno
Hi there, I'm going to use the db_user_namespace parameter to get a strong relationship between roles and databases, multiple databases -users included- residing in the same server without conflicts is my objective too. Right now I'm working on the backup process, which ideally would let me mirro

Re: [GENERAL] My first revoke

2008-09-25 Thread Fernando Moreno
Hi, first of all, a new role doesn't have any privilege on any table (every type of database object has different default privileges), so you only have to grant select on the tables you want, and yes, one by one. You can also grant or revoke privileges this way: grant select on table1,table2,table

Re: [GENERAL] case expression

2008-09-24 Thread Fernando Moreno
> > BTW, should you have an "else" clause in there? - What happens when the > comparison fails? > As Tom said, a null value would be returned.

Re: [GENERAL] offtopic, about subject prefix

2008-09-04 Thread Fernando Moreno
2008/9/3 brian <[EMAIL PROTECTED]> > Fernando Moreno wrote: > >> Hello, I'm new to this mailing list, and I have a couple of questions: >> >> Is it really necessary to add the [GENERAL] prefix? >> > > The prefix is added by the mailing list soft

[GENERAL] offtopic, about subject prefix

2008-09-03 Thread Fernando Moreno
Hello, I'm new to this mailing list, and I have a couple of questions: Is it really necessary to add the [GENERAL] prefix? Are messages without this prefix likely to be ignored by automatic filters or something like that? Thanks in advance.

Re: [GENERAL] RAISE NOTICE format in pgAdmin

2008-08-29 Thread Fernando Moreno
2008/8/29 Bill Todd <[EMAIL PROTECTED]> > If I have a series of RAISE NOTICE 'xxx' statements in a plpgsql function > and I call the function from pgAdmin the notice messages are concatenated on > a single line on the Messages tab. Is there any way to get each message to > appear on a separate lin

[GENERAL] log_statement not working on pl/pgsql functions

2008-08-28 Thread Fernando Moreno
Hi, I've changed the setting log_statement to mod, in order to log data modifications, and it's working fine with sentences sent by the client application (psql included), but insert/update/delete sentences executed inside functions are not logged. Functions are called in a select query. I've relo

Re: [GENERAL] syntax error with execute

2008-05-30 Thread Fernando Moreno
I haven't use the RETURNING clause before, but the "INTO" option, at least in SELECT sentences, must be outside of the string expression. This way: EXECUTE 'some query' INTO variable; Cheers. 2008/5/30 A B <[EMAIL PROTECTED]>: > I have a query like this in a plpgsql function: > > EXECUTE 'INSERT