From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Rich Shepard <rshepard(at)appl-ecosys(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Syntax error needs explanation |
Date: | 2025-07-14 19:45:45 |
Message-ID: | ce828b41-3e25-4f68-aed2-397fddff8849@aklaver.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 7/14/25 12:38, Rich Shepard wrote:
Reply to list also.
Ccing list.
> On Mon, 14 Jul 2025, Adrian Klaver wrote:
>
>> The above looks like the format 'aligned' output from a query.
>
> Adrian,
>
> I mistyped the script's extension as .txt rather than .sql.
That does not matter, that is more for user convenience in figuring out
what the files are for.
\o test.txt
select * from cell_per;
Then doing:
psql -d production -U postgres -h localhost -p 5432 -f test.sql
Null display is "NULL".
psql:test.sql:82: ERROR: syntax error at or near "line_id"
LINE 1: line_id | category | cell_per | ts_insert |
psql -d production -U postgres -h localhost -p 5432 -f test.txt
Null display is "NULL".
psql:test.txt:82: ERROR: syntax error at or near "line_id"
LINE 1: line_id | category | cell_per | ts_insert | ...
The error is the same as psql just processes the file without regard to
the extension.
>
> Regards,
>
> Rich
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | veem v | 2025-07-14 19:51:38 | Performance of JSON type in postgres |
Previous Message | Adrian Klaver | 2025-07-14 19:36:19 | Re: Syntax error needs explanation |