[SQL] Update in all tables
Hello everybody I need to update a field with the same value in the tables of my data base but this field exists in almost all tables and has the same value, I don't want to code a script, so my question is if there is some way to update that field with a query and affects all the tables that contain the field? Thanks in advanced, regards!!! ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[SQL] Can't connect to the db
Hello every one I was using my db with an application in perl, but something occurs with the application and the pc got frozen and I had to restart my PC, when it boot again I coudn't restart the psql service when I do the psql mydb it shows me the next error, the error is in spanish but it says something like: psql: can't connect to the server: there is no file or directory is the server running local and accepting conecctions in the Unix domain socket «/tmp/.s.PGSQL.5432» do I have to reinstall again the postgres or can I do something else? ---(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
[SQL] Query from shell
Hi every body, somebody can show me hot to execute a query from a shell thanks in advanced!!! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
[SQL] Change of data type
Hello everybody, excuse me how can I change de data type of a field, I currently have: material character(30) but I now want the field in text type like this: material text somebody knows if ALTER TABLE has some option to do this?, or How can I do that? ---(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
[SQL] Undo an update
Hello everybody!! Is there a way to undo an update??? Thanks!!! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
[SQL] Substitute a Character
Hello everybody!! I have a field type text with folios like this: A98526 but I want to change de A for a 0 like this: 098526, exists a way to do this in a query??? Thanks in advanced!!! ---(end of broadcast)--- TIP 6: explain analyze is your friend
[SQL] Question about time
Hi everyone I'm doing a query like this: SELECT CAST(fecha_hora_factura as time) FROM nota_venta and I get: 14:16:52.824395 the field is timestamp type... I just want the HOUR:MINUTE:SECOND the question is how I drop the millisecond?? Thnx in advanced!!! ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[SQL] Question about GUI
Hello every body, I just want to know if there is some GUI with postgreSQL for Fedore Core 3?? Thanks in advanced!! ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
[SQL] Substitute
Hello everybody somebody knows, how I can substitute in a query if a field contains a character that I want to be shown with other character? for example if I have a \n I want to shows me a ~ in the result of the select thanks in advanced!! ---(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
[SQL] Authentification failed
Hello everybody!! I'm trying in SUSE to connect to a postgres db and this is the error: Ident Authentification failed for user <> I'm already created the user with createuser root, but the error persist, I would aprecciate some help, thanks in advanced ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[SQL] Sequences problem
Hello everybody, I have a question related with sequences. When I init a sesion with my db, if a do the next sentence: SELECT currval('pagos_id_pago_seq'); return this: ERROR: the relation doesn't exist (or somethimg like that, because the message is in spanish) but if I do first, SELECT nextval('pagos_id_pago_seq'); and then SELECT currval('pagos_id_pago_seq'); it success, returns the current sequence value, it is possible to indicate that the sequence is already started and in the value 4567 but I need first to now the current value before the next, how can I do? Thanks in advanced ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[SQL] pg_dump question
Hello every body!! I have a quesyion respect pg_dump... I need to backup the db structure, I suposse that I do with pg_dump -s, but I want to restore but just with some tables with the db catalogues, can I do this?, I mean, restore al the db structure without data and after restore the data of the catalogues tables?? ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
[SQL] Working slow
hello every body, I'm having a data base in a point of sale that is getting frozen, I already have run a vacuum -z -d to reindex the data base and nothing happens.. Some suggestions to speed the process, Do you guys think that the data base is nearly to broke? -- luxcorreoseguro -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
[SQL] effectiveness tool
Hello everybody!! I just want to know if there be some tool to analize the performance of a query, I mean to qualify the effectiveness, speed, if I have the correct indexes. Hope somebody can help me Thanks in advanced!! -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
[SQL] pg_clog/0202 Error
Hello every body I just want to know why is happening this to my data base I'm doing the following query: SELECT * FROM pagos where date(fecha_pago) = '2008-12-15'; It returns the next error: ERROR: can't find the transaction status 538976288 DETAIL: can't open file <> not exist file or directory what supposes that I must do?, is the table damaged? -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
[SQL] Copy question
Hello every body I'm trying to extract a query as follows: copy (select * from clientes where id_cliente = 7895) to '/home/paso/sel.copy'; But it returns the next error: ERROR: error de sintaxis en o cerca de «(» at character 6 LINE 1: copy (select * from clientes where id_cliente = 7895) to '/h... I was reading the manual and I think the sintaxis is correct, any idea wich is the cause of the error? -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
[SQL] ichar
I moved from postgres 7.0.2 to 8.0.1, in the 7.0.2 version I process the next query, and it succeed: select ichar(letra_ascii) || '-' || substr('0' ||num_factura,length (num_factura)+1,5) as factura from facturas but in 8.0.1 it outputs the next error: ERROR: not exist the function ichar(integer) HINT: any function match with the arguments types. Add explicit cast of types ---(end of broadcast)--- TIP 6: explain analyze is your friend
[SQL] cast
Hello I have a query that ran in 7.0.2, but in 8.0.1 does not, the query is the next: select n.factura, n.venta_neta, c.nombre_cli || ' ' || c.apellido_pat_cli || ' ' || coalesce (c.apellido_mat_cli,''), date(n.fecha_hora_factura), o.nombre_oft from nota_venta n, clientes c, oft_central o wheredate(n.fecha_hora_factura) >= '2005-10-01' and date(n.fecha_hora_factura) <= '2005-10-14' and n.id_cliente = c.id_cliente and cast(n.udf4 as integer) = o.id_oft_central and n.factura is not null and n.s_factura != 'T' order by o.nombre_oft"; it aparently returns an error because the cast, but I need to do the cast, does somebody knows how can I change the cast but with the same result, thnks ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[SQL] query to file
Excuse me, how can I send a query to a file?, for example the result of this query: select id_articulo, articulo, color_code from articulos; ---(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
[SQL] backend error
Hello everybody I have a failure making a select in a table the error that returns is the follow: Backend message type 0x44 arrived while idle pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. How can I do to fix the failure?
[SQL] date question
Hi everybody, in Postgres 7.0.2 I have the next query: SELECT * from clientes_proceso where fecha_mod::date <= now() -1; but in version 8.0.1 returns the next error: ERROR: The operator doesn't exist: timestamp with time zone - integer How can drop a day to now()??
Re: [SQL] time
Hello everybody!!!, I'd like to know if there another way to get the time from a timestamp type, because in earliest versions I just get the time like time(fecha) and now this returns an error, thanks in advanced!!!
[SQL] time
Hello everybody!!!, I'd like to know if there another way to get the time from a timestamp type, because in earliest versions I just get the time like time(fecha) and now this returns an error, thanks in advanced!!!
[SQL] pg_dump
Hi how could I restore a db if I did next: pg_dump -Z 9 soi > $DESTINO/soi.bkp Thanks in advanced
[SQL] Update in all tables
Hello everybody I need to update a field with the same value in the tables of my data base but this field exists in almost all tables and has the same value, I don't want to code a script, so my question is if there is some way to update that field with a query and affects all the tables that contain the field? Thanks in advanced, regards!!!