[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Artanis] Working with PostgresQL
From: |
Nala Ginrut |
Subject: |
Re: [Artanis] Working with PostgresQL |
Date: |
Sat, 05 Oct 2019 22:59:27 +0800 |
User-agent: |
mu4e 1.3.2; emacs 26.1 |
Hi ison!
It's my mistake, according to SQL standard, string literals are always
surrounded by single quotation marks.
I've fixed it in dbb5876bc5ddb457c94f304a211613d74993e396.
Please try it again.
Best regards.
ison writes:
> I'm trying to use Artanis with PostgresQL and it seems that it has
> some bugs with inserting/reading strings from the database.
> I noticed that integers can be inserted and read, but not strings.
> After investingating the issue I think it boils down the usage of
> "~s" in how Artanis formats strings (in files ssql.scm and fprm.scm)
>
> Which results in the string being printed with double quotes.
>
> For instance using the "where" function in Artanis such as:
> (where #:name "foo")
> prints:
> where name="foo"
>
> However, this results in an error in PostgresQL because it doesn't
> like double quotes. For example, the SQL query:
> SELECT * FROM mytable WHERE name="foo";
> is an error on PostgresQL. But
> SELECT * FROM mytable WHERE name='foo';
> is the right way to do it.
>
> Is there any way to work around this?
--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058
signature.asc
Description: PGP signature