Tag Info

Hot answers tagged

9

At first I thought it came from Sybase (which is where SQL Server originated of course), which has a lookup function, but this is PowerBuilder-related. And then I checked SQL Server 2000 and it doesn't light up in pink in Query Analyzer... ...if it was legacy from Sybase I would have expected it to be in the list of color-coded words all along. It's ...


3

In PostgreSQL, inserting a column named "ID" is one thing. Inserting a column named ID is another. create table test ( "ID" integer not null ); insert into test values (1); select * from test where ID = 1; ERROR: column "id" does not exist Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to ...


2

As it turns out, the key word loop needs to be double-quoted inside PL/pgSQL or the parser is confused: SELECT public.foo_fun(NEW."loop") INTO fRV; The situation in Postgres 9.3 is unchanged: SQL fiddle with quotes (works). SQL fiddle without quotes (doesn't work). It's generally a good idea to avoid typical key words like loop as identifiers. There are ...


2

The word LOOP is a reserved word in PL/pgSQL. If you want to use it as a column name, you need to quote it.



Only top voted, non community-wiki answers of a minimum length are eligible