vscode-postgres icon indicating copy to clipboard operation
vscode-postgres copied to clipboard

How to setup params?

Open rsofista opened this issue 2 years ago • 3 comments

I couldn't find anything regarding this so I'll open an issue.

I executed a query with a parameters and it returns

ERROR: there is no parameter $1

But I can't find where do set up this params

rsofista avatar Jun 10 '22 03:06 rsofista

this extension does not currently supported user entered parameterized queries

Borvik avatar Jun 10 '22 12:06 Borvik

NNNNOOOOOOOOOooooooooooo......

rsofista avatar Jun 10 '22 12:06 rsofista

A first level of support would be to ignore them. I'm using and loving pgtyped with postgresql. But when I connect my editor window to the database, all my parameters pop out with red squiggles.

This workflow, postgresql for editing queries then pgtyped for generating a typescript wrapper, could be phenomenally good. A little bit of effort to smooth the rough corners would be so welcome. The rough corners according to me are automatically connecting the editor window based on environment variables, getting some solution for design-time values for parameters, then cleaning up the intellisense pollution (is this possible? When I'm in the middle of a query, intellisense is polluted with abc suggestions, when postgresql can show me just the list of columns on a table)

In QueryFirst, against Sql Server, I can give design-time values to parameters directly in the .sql file, in a design-time section that's then ignored in the production version. I can open a sql file, automatically connected to my db, click play on a parameterized query and immediately see results.

bbsimonbb avatar Oct 26 '23 16:10 bbsimonbb