Hello Scott,
The cause of the problem is that my sql was written for sql server. Postgres has a slightly different syntax:
- In sql server #TableName creates a temporary table. In postgres we have to CREATE TEMP TABLE TableName.
- SqlServer IDENTITY = postgres SERIAL
- NVARCHAR(MAX) = postgres TEXT
- the getdate() function is now() in postgres
The code below should work:
CREATE TEMP TABLE ErrorMessages (
Id SERIAL PRIMARY KEY
, ErrorTimeStamp TIMESTAMP DEFAULT now()
, ErrorCode INT
, ErrorMessage TEXT
, ReportedBy TEXT
);
Happy coding and thanks for your response!
-mike