Re: [PERFORM] column name is LIMIT

2005-03-21 Thread Jan Wieck
On 3/14/2005 4:26 AM, Qingqing Zhou wrote: So is it to make SQL parser context-sensitive - say the parser will understand that in statement SELECT * from LIMIT, LIMIT is just a table name, instead of keyword? More or less, yes. To use a reserved keyword as an identifier (table or column name), it

Re: [PERFORM] column name is LIMIT

2005-03-21 Thread Tom Lane
Jan Wieck [EMAIL PROTECTED] writes: There is a builtin function quote_ident() in PostgreSQL that is supposed to return a properly quoted string allowed as an identifier for whatever name is passed in. But it fails to do so for all lower case names that are reserved keywords. Not any more

Re: [PERFORM] column name is LIMIT

2005-03-20 Thread Qingqing Zhou
So is it to make SQL parser context-sensitive - say the parser will understand that in statement SELECT * from LIMIT, LIMIT is just a table name, instead of keyword? There might be some conflicts when using Yacc, but I am not sure how difficult will be ... Cheers, Qingqing Christopher

Re: [PERFORM] column name is LIMIT

2005-03-14 Thread Gourish Singbal
Thanks a lot, we might be upgrading to 8.0.1 soon.. till than using double quotes should be fine. regards gourish On Mon, 14 Mar 2005 18:25:22 +1100, Russell Smith [EMAIL PROTECTED] wrote: On Mon, 14 Mar 2005 06:14 pm, Gourish Singbal wrote: Guys, I am having a problem firing queries on

Re: [PERFORM] column name is LIMIT

2005-03-14 Thread Christopher Kings-Lynne
You will still need to use double quotes in 8.0.1... Chris Gourish Singbal wrote: Thanks a lot, we might be upgrading to 8.0.1 soon.. till than using double quotes should be fine. regards gourish On Mon, 14 Mar 2005 18:25:22 +1100, Russell Smith [EMAIL PROTECTED] wrote: On Mon, 14 Mar 2005 06:14

Re: [PERFORM] column name is LIMIT

2005-03-14 Thread Robert Treat
Yeah... how come no one told him don't do that? LIMIT is an SQL reserved word, so it's likely to cause trouble in any database you try to use it on... I'd strongly recommend renaming that column asap. You can see other reserved words at

Re: [PERFORM] column name is LIMIT

2005-03-14 Thread Jan Wieck
On 3/14/2005 1:28 PM, Robert Treat wrote: Yeah... how come no one told him don't do that? LIMIT is an SQL reserved word, so it's likely to cause trouble in any database you try to use it on... I'd strongly recommend renaming that column asap. You can see other reserved words at

Re: [PERFORM] column name is LIMIT

2005-03-14 Thread Tom Lane
Jan Wieck [EMAIL PROTECTED] writes: quote_ident() function doesn't quote reserved words ... as it IMHO is supposed to do. You're right, it probably should. The equivalent code in pg_dump knows about this, but quote_ident() doesn't. One thing that's been on my mind with respect to all this is

Re: [PERFORM] column name is LIMIT

2005-03-14 Thread Bryan Encina
Note also that the Slony-I replication system has problems with column names identical to reserved words. This is rooted in the fact that the quote_ident() function doesn't quote reserved words ... as it IMHO is supposed to do. Jan Does this apply to table names as well or just

Re: [PERFORM] column name is LIMIT

2005-03-14 Thread Jan Wieck
On 3/14/2005 2:26 PM, Bryan Encina wrote: Note also that the Slony-I replication system has problems with column names identical to reserved words. This is rooted in the fact that the quote_ident() function doesn't quote reserved words ... as it IMHO is supposed to do. Jan Does this apply to

Re: [PERFORM] column name is LIMIT

2005-03-13 Thread Russell Smith
On Mon, 14 Mar 2005 06:14 pm, Gourish Singbal wrote: Guys, I am having a problem firing queries on one of the tables which is having limit as the column name. If a run an insert/select/update command on that table i get the below error. ERROR: syntax error at or near limit at character

Re: [PERFORM] column name is LIMIT

2005-03-13 Thread Christopher Kings-Lynne
Put around the column name, eg: insert into limit values (1, 2,3 ); Chris Gourish Singbal wrote: Guys, I am having a problem firing queries on one of the tables which is having limit as the column name. If a run an insert/select/update command on that table i get the below error. ERROR: syntax