Nisha Patel
Problem
I am working on a project In which a user database is created when he successfully signs Up. On the frontend form user inputs the size of the database. Now on the backend, I have a createDatabase function which creates a database for the user and sets the size of the database as per the size given by the user. Here is the code of my function;
Now I am getting this error on backend terminal when I submit the form;
Solution
There's no size clause in >alter database and 104857600B is not a valid literal of any kind, in any version. Different versions parse this differently, which is why they complain at different stages:
>15+ at the literal:
>9.5-14 at the semicolon - in these versions >104857600B works as 104857600::int AS "b" which confuses the parser in a different way:
Even if you fix the literal, this still makes no sense to PostgreSQL:
>9.4 complains about it regardless of whether the literal is valid, even though it would potentially accept it as 104857600::int AS "b" elsewhere:
Suggested blogs:
>How to Select checkboxes on an HTML treeview with JavaScript?
>How to use querySelectorAll()" with multiple conditions in JavaScript?
>How to fix mouseover event glitch in JavaScript?
>How to do light and dark mode in a website using HTML and JavaScript?
>How to manipulate manipulating Array object in JavaScript?
>How to merge an object into Array with the same key in JavaScript?
>Javascript Error Solved: Property 'id' does not exist on type 'T'
>Why highlighted table row using class not working in JavaScript?
>How to rename an object key based on the condition in JavaScript?
>How to sort an array based on another array in Javascript?
>Javascript: Modal not closing with a button