Re: [GENERAL] syntax error

2017-11-02 Thread nmmulla
I have figured it out. Thanks for thinking -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- 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] Syntax error needs fresh eyeballs

2016-12-26 Thread Rich Shepard
On Mon, 26 Dec 2016, Tom Lane wrote: ERROR: there is no unique constraint matching given keys for referenced table "weather_params". because Weather_Params.param isn't constrained to be unique. ... Seeing that Weather_Data also has a site_id column, I'm going to guess that what you wanted

Re: [GENERAL] Syntax error needs fresh eyeballs

2016-12-26 Thread Mike Sofen
From: Rich Shepard My schema includes three tables and psql throws an error I'm not seeing when I try to read the schema into the database. I'd appreciate fresh eyes looking at the table and learning what error I'm not seeing. The tables: CREATE TABLE Weather ( site_id INTEGER PRIMAR

Re: [GENERAL] Syntax error needs fresh eyeballs

2016-12-26 Thread Tom Lane
Rich Shepard writes: >My schema includes three tables and psql throws an error I'm not seeing > when I try to read the schema into the database. I'd appreciate fresh eyes > looking at the table and learning what error I'm not seeing. Hm, seems straightforward enough to me: the only uniqueness

Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Adrian Klaver
On 01/20/2016 08:00 AM, Sachin Srivastava wrote: Dear Adiran, Thanks for your help !! First I want to say it's not giving the error for this ""languaget...@repos.birchstreet.net ", so there is any need to do the change as suggested by you. You are no

Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Sachin Srivastava
Dear Adiran, Thanks for your help !! First I want to say it's not giving the error for this "" languaget...@repos.birchstreet.net", so there is any need to do the change as suggested by you. Second you suggested " exit with cur1; " - *You are right after putting the semi column my code is workin

Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Adrian Klaver
On 01/20/2016 06:32 AM, Sachin Srivastava wrote: Dear Thom, Please find the complete code as below and suggest now. I would suggest spending some time here: http://www.postgresql.org/docs/9.4/interactive/plpgsql.html in particular: http://www.postgresql.org/docs/9.4/interactive/plpgsql-cont

Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Sachin Srivastava
Dear Thom, Please find the complete code as below and suggest now. -- -- Function: gen_budget_for_next_year(bigint, bigint, bigint) -- DROP FUNCTION gen_budget_for_next_year(bigint, bigint, bigint); CREATE OR REPLACE FUNCTION gen_budget_for_next_year( subid bigint, co

Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Thom Brown
On 20 January 2016 at 12:15, Sachin Srivastava wrote: > I am unable to find out the syntax error in below code, please suggest? > > > > ERROR: syntax error at or near "select" > LINE 44: select Count(0) into sFound from budget_period ... > ^ > ** Error **

Re: [GENERAL] syntax error while using pg_dump in Postgres 8.4

2014-10-30 Thread David G Johnston
The psql console still operates mainly at the SQL level of input. You need to use your OS's shell to run pg_dump. Both psql and pg_dump are the same kind of application and are run in a similar fashion. David J. On Thu, Oct 30, 2014 at 11:13 AM, CrabbeS [via PostgreSQL] < ml-node+s1045698n5825

Re: [GENERAL] syntax error while using pg_dump in Postgres 8.4

2014-10-30 Thread David G Johnston
CrabbeS wrote > I am trying to copy a table form one database to another by using this > command in the SQL-query builder: > pg_dump TA2000 -t from Forest -c -s | psql -h localhost postgis; pg_dump is a standalone application (i.e., something you run in a shell/command-line) and not an SQL command

Re: [GENERAL] syntax error in a trigger. can't find it.

2013-01-12 Thread Tom Lane
"Rhys A.D. Stewart" writes: > I must be very tired, very hungry or both. I'm getting a syntax error in > the last line with the 'END;' But am clearly not seeing what the error is. > Any help would be appreciated. I think you need to change ELSE IF to ELSEIF. As written you need two END IF lines

Re: [GENERAL] syntax error in a trigger. can't find it.

2013-01-12 Thread Rhys A.D. Stewart
Found it, had ELSE IF instead of elsif..very from the indicated error. On Sat, Jan 12, 2013 at 5:10 PM, Rhys A.D. Stewart wrote: > Greetings, > > I must be very tired, very hungry or both. I'm getting a syntax error in > the last line with the 'END;' But am clearly not seeing what the error

Re: [GENERAL] syntax error collate

2012-10-03 Thread Raymond O'Donnell
On 03/10/2012 15:31, Niklas Langvig wrote: > Hello > If I do this from pgAdmin on windows to my localhost database 9.2 it > works fine > CREATE COLLATION Test ( > > LOCALE = 'en_US.UTF-8' > > ) > > > If I connect to a linux server and do the sameI get > > ERROR: syntax error at or near "C

Re: [GENERAL] Syntax Error for "boolean('value')" Type Casting

2011-05-22 Thread David Johnston
On May 22, 2011, at 6:22, Alban Hertroys wrote: > On 21 May 2011, at 21:17, David Johnston wrote: > >> SELECT boolean('true') >> SQL Error: ERROR: syntax error at or near "(" LINE 1: SELECT boolean('true') ^ >> >> The following work as expected: >> >> SEL

Re: [GENERAL] Syntax Error for "boolean('value')" Type Casting

2011-05-22 Thread Alban Hertroys
On 21 May 2011, at 21:17, David Johnston wrote: > SELECT boolean('true') > >>> SQL Error: ERROR: syntax error at or near "(" >>> LINE 1: SELECT boolean('true') >>> ^ > > The following work as expected: > > SELECT bool('true') (...) > While I'm here.is there any downside t

Re: [GENERAL] Syntax error in spi_prepare usage

2010-04-28 Thread dipti shah
Thanks a lot Alban. That was simple! On Sat, Apr 24, 2010 at 10:15 PM, Alban Hertroys < dal...@solfertje.student.utwente.nl> wrote: > > If I remove the braces from (\$1, \$2, \$3) then it gives below error. > > > > my $query = (< > INSERT INTO changelogtest(id, txid, txtime) > > SELECT \$1,

Re: [GENERAL] Syntax error in spi_prepare usage

2010-04-24 Thread Alban Hertroys
> If I remove the braces from (\$1, \$2, \$3) then it gives below error. > > my $query = (< INSERT INTO changelogtest(id, txid, txtime) > SELECT \$1, \$2, \$3 > EXCEPT > SELECT (id, txid, txtime) > FROM changelogtest > WHERE id = \$1 > AND txid = \$2 > AND txtime = \$3; > ENDQUE

Re: [GENERAL] Syntax error in trigger

2010-04-22 Thread Jignesh Shah
I got it resolved. I just need to put below statement into single quote instead of double quote. :) my $query ='INSERT INTO log_table(id) SELECT $1 EXCEPT SELECT id FROM log_table WHERE id = $1;'; Thanks, Jignesh On Thu, Apr 22, 2010 at 2:02 PM, Jignesh Shah wrote: > Thanks Anreas but I think t

Re: [GENERAL] Syntax error in trigger

2010-04-22 Thread Jignesh Shah
Thanks Anreas but I think that's not a issue. The issue is something to do with "$1". I don't know how to get rid of it. techdb=# INSERT INTO log_table(id) SELECT 5 EXCEPT SELECT id FROM log_table WHERE id = 5; INSERT 0 1 techdb=# select * from log_table; id | txid | txtime +-

Re: [GENERAL] Syntax error in trigger

2010-04-21 Thread Andreas Kretschmer
Jignesh Shah wrote: > Hi All, > > I have written below trigger and applied on the table but it is giving syntax > error when it gets invoked. Could you please help me what is wrong? I have > given complete details here: > > my trigger function: > > CREATE OR REPLACE FUNCTION techdb_logtable

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Aycock, Jeff R.
- From: Osvaldo Kussama [mailto:osvaldo.kuss...@gmail.com] Sent: Wednesday, January 27, 2010 11:57 AM To: Aycock, Jeff R. Subject: Re: [GENERAL] syntax error during function call 2010/1/27 Aycock, Jeff R. : > Hello, > > > > I have a function with three parameters that would populate

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Sam Mason
On Wed, Jan 27, 2010 at 10:40:17AM -0500, Aycock, Jeff R. wrote: > EXECUTE 'SELECT *, $1, now() INTO schema_1.'||whoami||' FROM > schema_2.'||whoami||' where created_dt between $2 and $3;' You'll also need to expand those other parameters. The code is executed in an independent scope and hence P

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Adrian Klaver
On 01/27/2010 08:50 AM, Aycock, Jeff R. wrote: Thanks for the catch. However, this did not fix the syntax error. Looking back at this thread I second Andreas's suggestion. It seems the syntax is right but the names are wrong. What is the result when you do SELECT * FROM schema_1.snapshot_ta

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Adrian Klaver
On 01/27/2010 08:50 AM, Aycock, Jeff R. wrote: Thanks for the catch. However, this did not fix the syntax error. You are sure the function is being replaced with versions that have the changes? In other words does \df+ show the changes? -- Adrian Klaver adrian.kla...@gmail.com -- Sent v

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Aycock, Jeff R.
Thanks for the catch. However, this did not fix the syntax error. -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gmail.com] Sent: Wednesday, January 27, 2010 11:47 AM To: Aycock, Jeff R. Cc: Pavel Stehule; pgsql-general@postgresql.org Subject: Re: [GENERAL] syntax error

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Adrian Klaver
On 01/27/2010 08:41 AM, Aycock, Jeff R. wrote: Adrian, I tried that as well and got the same error result. Regards, Jeff Aycock I went back to the original function and assuming no cut/paste errors there is a ';' missing after the last END. END; RETURN NEXT r; E

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Aycock, Jeff R.
Adrian, I tried that as well and got the same error result. Regards, Jeff Aycock -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gmail.com] Sent: Wednesday, January 27, 2010 11:33 AM To: Aycock, Jeff R. Cc: Pavel Stehule; pgsql-general@postgresql.org Subject: Re: [GENERAL

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Andreas Kretschmer
Aycock, Jeff R. wrote: > Pavel, > > Per your suggestion I modified one line below BEGIN to look like this: > > EXECUTE 'SELECT *, $1, now() INTO "schema_1".'||"whoami"||' FROM > "schema_2".'||"whoami"||' where created_dt between $2 and $3;' ^^

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Adrian Klaver
On 01/27/2010 08:27 AM, Aycock, Jeff R. wrote: Pavel, Per your suggestion I modified one line below BEGIN to look like this: EXECUTE 'SELECT *, $1, now() INTO "schema_1".'||"whoami"||' FROM "schema_2".'||"whoami"||' where created_dt between $2 and $3;' However, it is still giving me the same

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Aycock, Jeff R.
s still giving me the same syntax error as before. I must be missing something here though. Thanks for the suggestion, however. Regards, Jeff Aycock -Original Message- From: Pavel Stehule [mailto:pavel.steh...@gmail.com] Sent: Wednesday, January 27, 2010 11:13 AM To: Aycock, Jeff R

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Pavel Stehule
> > ERROR:  syntax error at or near "(" > > LINE 1: SELECT *, $1, now() INTO schema_1.(table_A) FROM schema_2.(table_A) > where created_dt between $2 and $3; > > schema_1.(table_A) is nonsense. have to be "schema_1"."table_A" regards Pavel Stehule -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Aycock, Jeff R.
010 11:00 AM To: Aycock, Jeff R. Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] syntax error during function call On 27/01/2010 15:40, Aycock, Jeff R. wrote: > BEGIN > > FOR r IN SELECT * FROM schema_1.snapshot_table > > LOOP > > > > DE

Re: [GENERAL] syntax error during function call

2010-01-27 Thread Raymond O'Donnell
On 27/01/2010 15:40, Aycock, Jeff R. wrote: > BEGIN > > FOR r IN SELECT * FROM schema_1.snapshot_table > > LOOP > > > > DECLARE whoami text := r; I could be wrong, but I don't think that the DECLARE inside the loop is correct. I think you have to declare "whoami" with t

Re: [GENERAL] Syntax error with select statement

2008-12-18 Thread aravind chandu
Thank You, Aravind. --- On Thu, 12/18/08, Joshua J. Kugler wrote: From: Joshua J. Kugler Subject: Re: [GENERAL] Syntax error with select statement To: pgsql-general@postgresql.org Date: Thursday, December 18, 2008, 1:51 AM On Wednesday 17 December 2008, justin said something like: > aravi

Re: [GENERAL] Syntax error with select statement

2008-12-17 Thread Joshua J. Kugler
On Wednesday 17 December 2008, justin said something like: > aravind chandu wrote: > > Hello, > > I have problem with select statement in c++ program I am > > using pqxx library to connect to postgresql database.My query is > > > > result R(T.exec(" select * from dbtable where u

Re: [GENERAL] Syntax error with select statement

2008-12-17 Thread justin
aravind chandu wrote: Hello, I have problem with select statement in c++ program I am using pqxx library to connect to postgresql database.My query is result R(T.exec(" select * from dbtable where username = ' "+user+" ' and password = ' "+st+" ' ")); here st i

Re: [GENERAL] syntax error on: GET DIAGNOSTICS xcount = ROW_COUNT;

2008-09-09 Thread Tom Lane
<[EMAIL PROTECTED]> writes: > I am getting an error on "GET DIAGNOSTICS " statement in a PL/SQL function > below. > CREATE OR REPLACE FUNCTION test(lid int, OUT nid int) AS $$ > DECLARE > road_row road%ROWTYPE; > BEGIN > SELECT * INTO road_row FROM road WHERE link_id=lid; > GET DIAGNOSTICS

Re: [GENERAL] syntax error at or near "PERFORM"

2008-08-15 Thread Raymond O'Donnell
On 15/08/2008 05:32, Dale wrote: On Aug 15, 2:14 pm, Dale <[EMAIL PROTECTED]> wrote: even when I try executing something basic: PERFORM (2 + 3); I found my problem. Unfortunately PERFORM can only be used within a "LANGUAGE plpgsql" script. Yes, that's it - outside a function, you just d

Re: [GENERAL] syntax error at or near "PERFORM"

2008-08-14 Thread Dale
On Aug 15, 2:14 pm, Dale <[EMAIL PROTECTED]> wrote: > Hi, > > When ever I try and call the PERFORM statement I get: > ERROR:  syntax error at or near "PERFORM" > even when I try executing something basic:  PERFORM (2 + 3); > > Any ideas please? > > Dale. I found my problem. Unfortunately PERFORM

Re: [GENERAL] syntax error with execute

2008-06-02 Thread A B
> EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES > ('||vals||') RETURNING currval('''||seqname||''')' INTO newid > > Note where last quote goes. That was exactly what I wanted to do! SELECT 'Thank you' FROM heart; -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] syntax error with execute

2008-05-30 Thread Gurjeet Singh
On Fri, May 30, 2008 at 9:25 PM, A B <[EMAIL PROTECTED]> wrote: > I have a query like this in a plpgsql function: > > EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES > ('||vals||') RETURNING currval('''||seqname||''') INTO newid' > > and I get the response: > > ERROR: syntax error at o

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

Re: [GENERAL] syntax error with execute

2008-05-30 Thread Vyacheslav Kalinin
> > EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES > > ('||vals||') RETURNING currval('''||seqname||''') INTO newid' You probably were to do: EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES ('||vals||') RETURNING currval('''||seqname||''')' INTO newid Note where last quo

Re: [GENERAL] syntax error with execute

2008-05-30 Thread Scott Marlowe
Pretty sure you have to create the query as a string and execute that. On Fri, May 30, 2008 at 9:55 AM, A B <[EMAIL PROTECTED]> wrote: > I have a query like this in a plpgsql function: > > EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES > ('||vals||') RETURNING currval('''||seqname||'''

Re: [GENERAL] Syntax error when restoring database from dump

2008-04-12 Thread Clodoaldo
My mistake. Sorry for the noise. Regards, Clodoaldo 2008/4/12, Clodoaldo <[EMAIL PROTECTED]>: > I dumped the db with: > pg_dump -C -f dbname.dump > > $ uname -a > Linux myhost.mydomain.net 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 14:10:25 > EST 2007 x86_64 x86_64 x86_64 GNU/Linux > > Postgresql 8.

Re: [GENERAL] syntax error at or near "PROCEDURAL"

2008-02-26 Thread Andreas Lau
be problems. But it seems > so. I will give it a try an report the result. > > Thanks Andreas > > -Ursprüngliche Nachricht- > Von: Magnus Hagander [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 26. Februar 2008 10:30 > An: Andreas Lau; pgsql-general@postgresql.org

Re: [GENERAL] syntax error at or near "PROCEDURAL"

2008-02-26 Thread Andreas Lau
s Hagander [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 26. Februar 2008 10:30 An: Andreas Lau; pgsql-general@postgresql.org Betreff: Re: [GENERAL] syntax error at or near "PROCEDURAL" On Tue, Feb 26, 2008 at 10:26:25AM +0100, Martijn van Oosterhout wrote: > On Tue, Feb 26, 2008 at 1

Re: [GENERAL] syntax error at or near "PROCEDURAL"

2008-02-26 Thread Magnus Hagander
On Tue, Feb 26, 2008 at 10:26:25AM +0100, Martijn van Oosterhout wrote: > On Tue, Feb 26, 2008 at 10:23:05AM +0100, Magnus Hagander wrote: > > Any chance you are running pg_dump/pg_restore version 8.3? The syntax > > appears to be what 8.3 uses, not 8.3.. > > > > You can use (and should use) an 8.

Re: [GENERAL] syntax error at or near "PROCEDURAL"

2008-02-26 Thread Martijn van Oosterhout
On Tue, Feb 26, 2008 at 10:23:05AM +0100, Magnus Hagander wrote: > Any chance you are running pg_dump/pg_restore version 8.3? The syntax > appears to be what 8.3 uses, not 8.3.. > > You can use (and should use) an 8.3 pg_dump to dump your 8.2 database when > upgrading to 8.3, but you often can't r

Re: [GENERAL] syntax error at or near "PROCEDURAL"

2008-02-26 Thread Magnus Hagander
On Mon, Feb 25, 2008 at 06:40:43PM +0100, Andreas Lau wrote: > Hello, > > I try to restore a dump file on a new Database. But unfortunatly i get this > error: > > pg_restore: [archiver (db)] Error while PROCESSING TOC: > pg_restore: [archiver (db)] Error from TOC entry 532; 2612 16386 PROCEDUR

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Bruce Momjian
Andrej Ricnik-Bay wrote: > On 11/8/07, Collin Kidder <[EMAIL PROTECTED]> wrote: > > > I'm with Thomas. I think that, while inline posting is a good thing, > > bottom posting is dead stupid and wastes my time. > Just as bad as top-posting, really. > > > It is far easier to > > follow a thread with

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/07/07 11:35, Andrej Ricnik-Bay wrote: > On 11/8/07, Collin Kidder <[EMAIL PROTECTED]> wrote: [snip] > > >> No, just not everyone agrees with your viewpoint on this topic. Top >> posting has it's place and some of us prefer it. > But they could

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Steve Wampler
Collin Kidder wrote: I'm with Thomas. I think that, while inline posting is a good thing, bottom posting is dead stupid and wastes my time. It is far easier to follow a thread with top posting as the relevant text is right there at the top ready to be read. That sounds more like an argument t

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Andrej Ricnik-Bay
On 11/8/07, Collin Kidder <[EMAIL PROTECTED]> wrote: > I'm with Thomas. I think that, while inline posting is a good thing, > bottom posting is dead stupid and wastes my time. Just as bad as top-posting, really. > It is far easier to > follow a thread with top posting as the relevant text is righ

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Collin Kidder
My point is: with top-posting I don't care how many lines were repeated because I don't have to scroll. Considering there is an RFC that recommends inline posting over top-posting (http://tools.ietf.org/html/rfc1855), and considering the fact that this topic has been beat to death on do

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Bill Moran
In response to Thomas Kellerer <[EMAIL PROTECTED]>: > Tom Lane, 07.11.2007 06:14: > > Thomas Kellerer <[EMAIL PROTECTED]> writes: > >> If everyone simply top-posted, there would be no need for me to scroll > >> down, > >> just to find a two line answer below a forty line quote - which I > >> pe

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Alvaro Herrera
Reg Me Please wrote: > P.S. > Why not including the pgloader into the main tarball? We are not attempting to include every useful tool in the database server. We're actually moving in the opposite direction: stuff has been offloaded to pgfoundry as appropriate. Add-on packages are encouraged. If

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Dimitri Fontaine
Le mercredi 07 novembre 2007, Reg Me Please a écrit : > I installed .deb. The man page has not been included. It seems the latter package on pgfoundry does have a problem here. As I have some patches waiting for a release, I'll make current CVS the 2.2.2 version and update the pgfoundry files so

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Reg Me Please
Il Tuesday 06 November 2007 19:05:52 Reg Me Please ha scritto: > Hi all. > I'm generating an SQL script to load some million rows into a table. > I'm trying to use the COPY command in order to speed the load up. > > At a certain point I get an error telling about a > "invalid input syntax for type

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Reg Me Please
Il Wednesday 07 November 2007 11:26:56 Dimitri Fontaine ha scritto: > Le mercredi 07 novembre 2007, Reg Me Please a écrit : > > Maybe just a complete example would suffice. Let's say a table structure, > > a CSV and a raw text file, a config file and the run output. > > Do you mean something like t

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Dimitri Fontaine
Le mercredi 07 novembre 2007, Reg Me Please a écrit : > Maybe just a complete example would suffice. Let's say a table structure, a > CSV and a raw text file, a config file and the run output. Do you mean something like the included examples, which I tend to also use as (regression) tests? http

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Reg Me Please
Il Wednesday 07 November 2007 11:10:40 Dimitri Fontaine ha scritto: > Le mercredi 07 novembre 2007, Reg Me Please a écrit : > > pgloader seems not that easy to use for a newbie like myself. > > Also because domentation seems too skinny. > > Sorry about this, writting documentation in English is not

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Dimitri Fontaine
Le mercredi 07 novembre 2007, Reg Me Please a écrit : > pgloader seems not that easy to use for a newbie like myself. > Also because domentation seems too skinny. Sorry about this, writting documentation in English is not that easy when it's not one's natural language... I'll accept any comment/p

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Reg Me Please
Il Wednesday 07 November 2007 07:54:41 Reg Me Please ha scritto: > Il Wednesday 07 November 2007 01:29:44 Alvaro Herrera ha scritto: > > Reg Me Please wrote: > > > Il Tuesday 06 November 2007 22:13:15 hai scritto: > > > That's the "branch and bound". Editing 29M+ lines file takes some time. > > > B

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Thomas Kellerer
Tom Lane, 07.11.2007 06:14: Thomas Kellerer <[EMAIL PROTECTED]> writes: If everyone simply top-posted, there would be no need for me to scroll down, just to find a two line answer below a forty line quote - which I personally find more irritating than top-posting. I think you're ignoring my b

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
Il Wednesday 07 November 2007 01:29:44 Alvaro Herrera ha scritto: > Reg Me Please wrote: > > Il Tuesday 06 November 2007 22:13:15 hai scritto: > > That's the "branch and bound". Editing 29M+ lines file takes some time. > > But this is the way I'm going to go right now. > > Huh, why not just use pgl

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Tom Lane
Thomas Kellerer <[EMAIL PROTECTED]> writes: > If everyone simply top-posted, there would be no need for me to scroll down, > just to find a two line answer below a forty line quote - which I personally > find more irritating than top-posting. I think you're ignoring my basic point, which was tha

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Alvaro Herrera
Reg Me Please wrote: > Il Tuesday 06 November 2007 22:13:15 hai scritto: > > Split it in half, with the appropriate sql on each end so the data > > still works, and see which half causes a problem. Keep splitting the > > one that causes a problem in half until you have a small one with the > > pr

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Dimitri Fontaine
Hi, Le Tuesday 06 November 2007 22:40:50 Tom Lane, vous avez écrit : > Reg Me Please <[EMAIL PROTECTED]> writes: > > I'm trying to understand what and where. > > The point is that I have this 29M+ lines script telling me there's a > > problem somewhere. You could use pgloader, which reads CSV inp

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Thomas Kellerer
Tom Lane wrote on 06.11.2007 21:21: The real point here is that when writing to a mailing list, you should make an effort to conserve other peoples' time. Hundreds of people are going to read what you wrote, possibly thousands when you count in people searching the list archives in the future.

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
Il Tuesday 06 November 2007 22:37:12 Scott Marlowe ha scritto: > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > Il Tuesday 06 November 2007 22:13:15 hai scritto: > > > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > > > Il Tuesday 06 November 2007 19:43:38 Scott Marlowe ha scritt

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Tom Lane
Reg Me Please <[EMAIL PROTECTED]> writes: > I'm trying to understand what and where. > The point is that I have this 29M+ lines script telling me there's a problem > somewhere. It told you exactly where it detected the problem. Actually ... are you looking at the right error message? If this is

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Scott Marlowe
On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > Il Tuesday 06 November 2007 22:13:15 hai scritto: > > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > > Il Tuesday 06 November 2007 19:43:38 Scott Marlowe ha scritto: > > > > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > > >

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
Il Tuesday 06 November 2007 22:13:15 hai scritto: > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > Il Tuesday 06 November 2007 19:43:38 Scott Marlowe ha scritto: > > > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > > > That seems not to be the case. > > > > The last line has a \

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Scott Marlowe
On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > Il Tuesday 06 November 2007 19:43:38 Scott Marlowe ha scritto: > > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > > That seems not to be the case. > > > The last line has a \. by its own and the last but one is > > > well formed. > >

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
Il Tuesday 06 November 2007 19:43:38 Scott Marlowe ha scritto: > On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > > That seems not to be the case. > > The last line has a \. by its own and the last but one is > > well formed. > > (Please don't top post...) > > Got a self contained test case y

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Tom Lane
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > But the other reason is that top posters are often the biggest > offenders of not editing their replies. there's nothing like seeing a > one line reply to a 500 line conversation. > When inline posting, one can delete the parts of the converstation > t

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Scott Marlowe
On Nov 6, 2007 1:16 PM, Collin Kidder <[EMAIL PROTECTED]> wrote: > This is offtopic but there is nothing wrong with top posting. Is there a > mail list policy on it or are you just picky about it? OK, I was being a bit flippant with my last response. The reasoning on technical mailing lists for p

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Scott Marlowe
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? On Nov 6, 2007 1:16 PM, Collin Kidder <[EMAIL PROTECTED]> wrote: > This is offtopic but there is nothing wrong with top postin

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Collin Kidder
This is offtopic but there is nothing wrong with top posting. Is there a mail list policy on it or are you just picky about it? Scott Marlowe wrote: On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: That seems not to be the case. The last line has a \. by its own and the last but one is

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Scott Marlowe
On 11/6/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > That seems not to be the case. > The last line has a \. by its own and the last but one is > well formed. (Please don't top post...) Got a self contained test case you can post? ---(end of broadcast)--

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Reg Me Please
That seems not to be the case. The last line has a \. by its own and the last but one is well formed. Il Tuesday 06 November 2007 19:14:00 Tom Lane ha scritto: > Reg Me Please <[EMAIL PROTECTED]> writes: > > At a certain point I get an error telling about a > > "invalid input syntax for type numer

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Tom Lane
Reg Me Please <[EMAIL PROTECTED]> writes: > At a certain point I get an error telling about a > "invalid input syntax for type numeric" > The incriminated line number is the last one (the one containing the \.). > Is there a way to know which line is really malformed? Why do you think the report

Re: [GENERAL] syntax error in "createdb"

2007-05-07 Thread Joris Dobbelsteen
Please state * Which version of postgresql are you using? * Which exact commands are you executing? * What are the exact error messages? Please be more precise. Your question is, I believe, too vague for the community to offer good help with your probl

Re: [GENERAL] Syntax error, but where?

2006-03-06 Thread Michael Trausch
Bricklen Anderson wrote: > > Is this actually part of the function: $$FUNC_BODY$$ ? > If so, try it as $FUNC_BODY$ (single dollar signs around identifier). > Oh, jeez. What an oversight. Thank you... I can't believe that I missed that. Sometimes, all that really is needed is a fresh pair of e

Re: [GENERAL] Syntax error in Execute statement

2006-03-06 Thread Michael Fuhr
On Mon, Mar 06, 2006 at 07:21:58AM -0800, Emil Rachovsky wrote: > I created a function "coalescec" which behaves the > same as coalesce, but uses an integer and a string. Is there a reason you can't use the standard COALESCE and cast the integer value to text/varchar? > Now I'm getting an error i

Re: [GENERAL] Syntax error, but where?

2006-03-06 Thread Bricklen Anderson
Michael Trausch wrote: Hey guys, I'm having a slight problem with this database that I'm trying to setup on PostgreSQL 8.1.3... What I've got is a stored procedure that refuses to get itself into the system, and I'm not sure why. It is throwing a syntax error on DECLARE, but I don't see it. I

Re: [GENERAL] SYNTAX ERROR at or near SQLSTATE

2006-01-26 Thread vishal saberwal
oh thanks,i didnt know that,highly appreciate your help and quick response ...vishOn 1/26/06, Michael Fuhr < [EMAIL PROTECTED]> wrote:On Thu, Jan 26, 2006 at 03:02:46PM -0800, vishal saberwal wrote: > When i run it on PostgreSQL8.0.1 (on fedora core 2), i get the error:>> dbm=# select * from excpt_

Re: [GENERAL] SYNTAX ERROR at or near SQLSTATE

2006-01-26 Thread Michael Fuhr
On Thu, Jan 26, 2006 at 03:02:46PM -0800, vishal saberwal wrote: > When i run it on PostgreSQL8.0.1 (on fedora core 2), i get the error: > > dbm=# select * from excpt_test(); > ERROR: syntax error at or near "sqlstate" at character 133 SQLSTATE and SQLERRM are new in 8.1; they're not available i

Re: [GENERAL] Syntax Error Inserting From STDIN?

2005-12-20 Thread Hunter's Lists
owe <[EMAIL PROTECTED]> > Date: Tue, 20 Dec 2005 16:41:32 -0600 > To: Hunter's Lists <[EMAIL PROTECTED]> > Cc: PostgreSQL > Subject: Re: [GENERAL] Syntax Error Inserting From STDIN? > > quick answer, try a different editor. > > Are you editing in the sa

Re: [GENERAL] Syntax Error Inserting From STDIN?

2005-12-20 Thread Scott Marlowe
g that? > > I inserted an extra line between the two, no dice. > > > From: Scott Marlowe <[EMAIL PROTECTED]> > > Date: Tue, 20 Dec 2005 13:53:37 -0600 > > To: Hunter's Lists <[EMAIL PROTECTED]> > > Cc: PostgreSQL > > Subject: Re: [GENERAL] S

Re: [GENERAL] Syntax Error Inserting From STDIN?

2005-12-20 Thread Tom Lane
"Hunter's Lists" <[EMAIL PROTECTED]> writes: > I get back: > COPY departments (id, issue_id, title, description, feature_type) FROM > stdin; > 23 4 Local BuzzThings to do, people to see, places to go. aspen > ERROR: syntax error at or near "23" at character 80 How are you feeding t

Re: [GENERAL] Syntax Error Inserting From STDIN?

2005-12-20 Thread Hunter's Lists
Interesting. How would I go about solving that? I inserted an extra line between the two, no dice. > From: Scott Marlowe <[EMAIL PROTECTED]> > Date: Tue, 20 Dec 2005 13:53:37 -0600 > To: Hunter's Lists <[EMAIL PROTECTED]> > Cc: PostgreSQL > Subject: Re: [GENE

Re: [GENERAL] Syntax Error Inserting From STDIN?

2005-12-20 Thread Scott Marlowe
On Tue, 2005-12-20 at 13:30, Hunter's Lists wrote: > I am trying to run the following: > > COPY departments (id, issue_id, title, description, feature_type) FROM > stdin; > 23 4 Local BuzzThings to do, people to see, places to go. aspen > > I get back: > > COPY departments (id, issue

Re: [GENERAL] Syntax Error in COPY - worked around

2005-11-26 Thread Freemail
: Friday, November 25, 2005 6:24 PM To: Együd Csaba Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Syntax Error in COPY On 11/25/05, Együd Csaba <[EMAIL PROTECTED]> wrote: > But the data was dumped with a windows version pg_dump. Or do know > wrong that pgadmin3 uses a boundle

Re: [GENERAL] Syntax Error in COPY

2005-11-25 Thread Jaime Casanova
On 11/25/05, Együd Csaba <[EMAIL PROTECTED]> wrote: > But the data was dumped with a windows version pg_dump. Or do know wrong > that pgadmin3 uses a boundled version of pg_dump (installed on the client)? > can you run a pg_dump (in FC4) and try with that dump? maybe it's some kind of problem with

Re: [GENERAL] Syntax Error in COPY

2005-11-25 Thread Együd Csaba
[mailto:[EMAIL PROTECTED] Sent: Friday, November 25, 2005 5:50 PM To: Együd Csaba Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Syntax Error in COPY On 11/25/05, Együd Csaba <[EMAIL PROTECTED]> wrote: > Source machine: FC4 + Pg8.0.3 (dumped out from) Target machine: WinXP > SP

Re: [GENERAL] Syntax Error in COPY

2005-11-25 Thread Jaime Casanova
On 11/25/05, Együd Csaba <[EMAIL PROTECTED]> wrote: > Source machine: FC4 + Pg8.0.3 (dumped out from) > Target machine: WinXP SP2. + Pg8.0.0 (trying to dump in) > The maessage : "ERROR: syntax error at or near "DE" at character 144" > ok. in FC4 execute unix2dos dumped_file.sql then try again

Re: [GENERAL] Syntax Error in COPY

2005-11-25 Thread Együd Csaba
25, 2005 5:31 PM To: Együd Csaba Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Syntax Error in COPY On 11/25/05, Együd Csaba <[EMAIL PROTECTED]> wrote: > Hi, > could anybody help me? > > The backend (8.0) complains about the syntax of the following command. > (This

  1   2   >