Postgresql is case case insensitive unless you impose a specific casing
using " (double quotes): they are valid everywhere postgresql expects an
identifier (schema name, table name, column name, cte name, after AS, etc.
So it's all correct.
See
ope that helps,
>
> Simon
>
> On Mon, May 24, 2021 at 4:12 PM Massimiliano della Rovere
> wrote:
> >
> > In postgresql the || operator is the only way (no, the concat() function
> doesn't work) to concat 2 JSONB dicts; note that this works only with JSONB
> and not J
In postgresql the || operator is the only way (no, the concat() function
doesn't work) to concat 2 JSONB dicts; note that this works only with JSONB
and not JSON.
Example:
suppose column "t.c" contains '{"a": 1}'::jsonb
SELECT t.c || jsonb_build_object('b', 2);
gives
{"a": 1, "b": 2}
Greetings,
how should I write the .values() section of a CORE update() statement to
render the following
postgres syntax?
The data column is a JSON(B) and contains a dict object.
UPDATE settings
SET data = data || '{"key": "value"}'
WHERE key = 'my_param';
Thanks,
Massimiliano
--
SQLAlchemy -
Greetings,
is it possible using sqlalchemy core to obtain the following code:
[...]
WHERE (column1, column2) = (value1, value2)
this is useful to use multi columnar indexes having column1 and column2 in
the two leftmost position and in later position columns that I put in the
SELECT section.
--
Greetings,
probably it's obvious to everybody but me, but I think it would be useful
specifying in both the literal and the bindparam documentation that
literal(bindparam(...)) is an invalid construct in sqlalchemy
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
When using .execution_options(stream_results=True), is it possible to pass
the cursor name too?
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See
{"timestamps": {"foo": "bar"}})
>
>
>
>
> On Tue, Sep 15, 2020, at 11:50 AM, Mike Bayer wrote:
>
> this indicates a bindparam() object is being interpreted as a value
> somewhere but I can't reproduce that.
>
> can you provide an MCVE
"preparing" of
queries?
Il giorno mar 15 set 2020 alle ore 17:13 Mike Bayer <
mike...@zzzcomputing.com> ha scritto:
> the dictionary is with column names as keys:
>
>
> set_={"data": bindparam("timestamps")}
>
> hope this helps
>
>
>
>
Greetings,
I am using SQLAlchemy==1.3.18.
I have an SQLAlchemy "Settings" table with a "data" column defined as:
from sqlalchemy.dialects.postgresql import JSONB
Settings = Table(
"settings",
self._metadata,
# ...
Column("data", JSONB, nullable=False))
and later in the code this
Greetings,
I am using
* SQLAlchemy: 1.3.3
* psycopg2-binary: 2.8.3
* postgresql: 9.6
While running a SQLAlchemy CORE script that makes lots of updates
(about 300k), some inserts (about 50k) and commits data only at the end,
the script consumes about 8GB+ RAM (well... we have to stop it to avoid
Il giorno lun 6 apr 2020 alle ore 16:30 Mike Bayer
ha scritto:
>
> On Mon, Apr 6, 2020, at 5:42 AM, Massimiliano della Rovere wrote:
>
> In SQLAlchemy CORE is there any way to use bindparam() to late-bind the
> type_ parameter of the func.cast function instead of a column?
>
&g
In SQLAlchemy CORE is there any way to use bindparam() to late-bind the
type_ parameter of the func.cast function instead of a column?
I wrote a function returning a "baked query", that extracts settings stored
in a XML column. I want the extracted value to be cast to a type depending
on the
Years later...
please can you give me some hints on how to write the Alias subclass and
the function to decorate with @complile?
I'm not expert with SQLAlchemy internals.
Il giorno martedì 4 marzo 2014 17:14:56 UTC+1, Michael Bayer ha scritto:
>
> if you want to select columns from a function
Greetings,
I'm writing to ask some hints for my problem.
I am using SQLAlchemy Core (no ORM, because everything it is wrapped by
sqlachemy_aio - everything happens inside a asyncio loop).
The program I'm working on can be deployed with a PostgreSQL or an Oracle
DB, customer choice, I have no
quot; (
"pkey" int PRIMARY KEY,
"field1" int,
"field2" varchar(10),
"ref" int REFERENCES "MYSCHEMA"."x" ("pkey")
);
Thanks,
Massimiliano
Il giorno venerdì 2 ottobre 2015 17:12:12 UTC+2, Michael Bayer ha scritto:
>
no venerdì 2 ottobre 2015 17:12:12 UTC+2, Michael Bayer ha scritto:
>
>
>
> On 10/2/15 9:44 AM, Massimiliano della Rovere wrote:
>
> cx-Oracle==5.2
> SQLAlchemy==1.0.8
>
> I'm in the weird situation of dealing with an Oracle database with
> lowercase identifiers (they were
quot;
Table(
quoted_name(tablename, quote=True),
metadata,
schema=schemaname,
autoload=True,
extend_existing=True)
Il giorno venerdì 2 ottobre 2015 17:12:12 UTC+2, Michael Bayer ha scritto:
>
>
>
> On 10/2/15 9:44 AM, Massimiliano della Rovere wrote:
>
&g
cx-Oracle==5.2
SQLAlchemy==1.0.8
I'm in the weird situation of dealing with an Oracle database with
lowercase identifiers (they were created by another software that escapes
always table/schema/index identifiers).
I get a "NoSuchTableError" whenever I issue a
MetaData(bind=engine,
Greetings,
I have two questions to the following code that works, but looks dirty to
me.
Being new to SQLAlchemy I'd like to ask for advices.
The database is PostgreSQL.
The following check_xyz function must check whether the index
"table_xyz_idx" exists in table "table".
The table surely
20 matches
Mail list logo