Re: [SQL] Finding context for error log

2006-09-26 Thread Vivek Khera
On Sep 26, 2006, at 10:56 AM, Tom Lane wrote: "log_min_error_statement = error" is what you're looking for. my personal belief is that this should be the default, as the current default (essentially "never") is mostly useless. smime.p7s Description: S/MIME cryptographic signature

Re: [SQL] Populating using Select

2006-09-26 Thread Ezequias Rodrigues da Rocha
Thank you very much Andrew. Now I learned.Best regardsFrom BrazilEzequias R. da Rocha2006/9/26, Andrew Sullivan <[EMAIL PROTECTED] >:On Tue, Sep 26, 2006 at 09:35:18AM -0300, Ezequias Rodrigues da Rocha wrote: > I was trying to make something like this:>> Insert into base.neigborhood values (nextva

[SQL] Populating using Select

2006-09-26 Thread Ezequias Rodrigues da Rocha
Hi list,I need to populate a neigborhood table base on a select of another table that already have a good amount of neigborhood saved.Could someone tell me how it is possible ?I was trying to make something like this: Insert into base.neigborhood values (nextval(), Select distinct name from base.cl

Re: [SQL] Finding context for error log

2006-09-26 Thread Tom Lane
Kyle Bateman <[EMAIL PROTECTED]> writes: > Is there an easy way to get postgres to > spit out the SQL statement it was parsing when it generated the error? "log_min_error_statement = error" is what you're looking for. regards, tom lane ---(end of

[SQL] Finding context for error log

2006-09-26 Thread Kyle Bateman
I get the following message in my postgres log: ERROR: 42601: syntax error at or near "%" at character 269 LOCATION: yyerror, scan.l:761 I have a fairly complex schema (lots of database objects) and many users hitting the db with lots of connections, so I'm not really sure what bit of code i

Re: [SQL] Populating using Select

2006-09-26 Thread Andrew Sullivan
On Tue, Sep 26, 2006 at 09:35:18AM -0300, Ezequias Rodrigues da Rocha wrote: > I was trying to make something like this: > > Insert into base.neigborhood values (nextval(), Select distinct name from > base.clients). Not quite. INSERT INTO base.neighborhood (column list) SELECT nextval(