Xata

X

Xata

This is Xata's community Discord server, where we discuss all things Xata: projects, features, dreams!

Join

help

general

Probably a bug

When attempting to add a record through the interface and link it to other tables, by using the "link" functionality, it consistently retrieves data from the "main" branch, regardless of the branch I am currently in.
No description

pgroll.is_active_migration_period Error

I just started to use pgroll, and tried it initially with local postgres 16 in docker. All works fine. After that, I decided to apply the same migration to the my db in XATA and as a result get this error: Failed to start migration: pq: function [pgroll.is_active_migration_period] is unknown or not allowed What did I do wrong? Maybe someone has faced it before?...

Cannot to run non-interactive xata init

Hi, I want to run the โ€œxata initโ€ command non-interactive with flags, but returns me "Error: The current command required interactivity, but the --no-input flag is being used. Use --help to check if you can pass arguments instead or --yes to use the default answers for all questions. ". The command I executed was "xata init --db https://workspace-1234.us-east-1.xata.sh/db/database-name --sdk --no-input --yes --codegen=src/xata.ts --force". When I remove the --no-input flag asks me " You are working with a Postgres enabled branch. We recommend using the 'next' version of the Xata SDK. Do you want to install the recommended version (@xata.io/client@next)" but even if I say yes and install it, it asks me again and again. Am i missing something?...
No description

Unable to link a field to table via Xata SDK (JS/TS)

hello, I have been trying to link a role field in one table to a record in the roles table via the Xata SDK, but it does not seem to work. For more context, I am trying to create a new user and the role field is a link to the roles table. In the schema definition, the role cannot be null, but console.loging the return value from db.users.create returns the created user without the link under the role field. I have tried manually passing in the ID to the role I want to link, but that returns Fig. 1 and the new user record is not created If I try to pass the actual value I want from the roles table i.e. roles.role e.g. being == 'user', the create command is successful but users.role is still null. see Fig.2. ...
No description

Codegen timeouts

I'm getting constant timeouts on codegen today but the system status page says everything is fine of XATA. Any one else experiencing that? xata codegen
FetchError: request to https://abc123.ap-southeast-2.xata.sh/db/projects:main failed, reason: Code: ETIMEDOUT...

Help with initializing pgroll

Hi I'm trying to initialize pgroll but having some issue special characters in the password. I get an error Error: parse "postgres://postgres:Pass{[email protected]:5432/testdb search_path=pgroll": net/url: invalid userinfo. I also took a look at the supported commands for pgroll in the documentation. Is that the the full list of supported commands? Is there support for other commands like WITH or UPDATE, etc ...

Performance Concern - Database Migration Latency

I'm testing out different managed Postgres hosting solutions (from my dev machine but I've tried from a hosted server too.) and I'm experiencing unexpectedly slow execution times for create table queries, which is impacting my development workflow. Key Details: - Operation Type: Create table migrations - Observed Performance: Substantially longer execution times than anticipated...
No description

New Xata dedicated cluster version string?

Hey! Doing the updates of pgversions.com on behalf of Neon, asked here previously about the dedicated cluster version string, has this bumped up because of the recent minor releases at all?

Xata Dashboard error when trying to delete a file

Hi ๐Ÿ‘‹ I remember this working a few months ago, but now I'm getting an error whenever I try to update a record in the Dashboard that has a file. The error message: ```...

Need help with: invalid SQL: table [main/excluded] not found

Using Kysely as a dialect. Trying to insert data and resolve conflict by using native PG "excluded" table when running into conflict. My code: `return await this._db .insertInto('Reports') .values(values)...

Push into an existing array with xata's SDK

Hi, I'm using Xata's SDK for python to create new rows into my db, right now we try to find a solution to push new floats into a price array, but i can't find how to do it with Xata SDK without having to fetch all the information one by one. As this is a basic function on Postgres, i was wondering if it's not yet implemented onto the SDK. Thanks in advance.

python xata client out of sync when using .data() vector search

Hi folks, I am trying to use the xata client in python SDK search ingessted records, after editing schema while developing im noticing like complete out of sync data -- missing records, misssing columsn even though the schema has been pushed, etc, how do i fix this as it makes vector search unusable in prod. My intuition is theres indexing happening on the table with the embeddings -- its strange cuz it was working fine til i edited the schema now ssearching is essentially a no op / does not work...

permission denied for schema

Migration failed, unable to execute start operation: pq: permission denied for schema
No description

Merge dev branch to main branch

Hello, I'm currently working on some project and I need to merge my changes n my dev branch to our main for production release. I wanted to know on how to do it?

Transfer ownership in free plan

I'm working on a personal project for a friend, but I will not keep the workspace for myself. I've seen that you can add members to the workspace and assign them as owners but I think the option is available only to Pro members. There is a way to do this with the free plan?...

How can I get data from a different table when adding a column? - Multi Schema Migrations

Hi ๐Ÿ‘‹ Say I want to store a user's full name inside a post. For this, I would add a column to the posts table userFullName using pgroll: ```json...

Kysely types - ID

We've created tables directly with sql script as we need inheritance and don't want xata_* columns in our data. Everything works nice, but when I try to query with id column I get this error:
Argument of type '1' is not assignable to parameter of type 'OperandValueExpressionOrList<Model<DatabaseSchema>, "buildings", "id">'
Argument of type '1' is not assignable to parameter of type 'OperandValueExpressionOrList<Model<DatabaseSchema>, "buildings", "id">'
...
No description

Custom id field in transaction update operations

Hello everyone. I would like to perform bulk upsert operations (https://xata.io/docs/sdk/transaction#update) using a custom unique field as the identifier instead of the default xata_id field. Is this possible, or is there a better way to achieve this?

using pgstream to replicate Azure Postgres Flexible Server

Hello everyone, We are looking for a solution that is able to replicate DDL changes for Azure Postgres Flexible and have been looking at pgstream but are unsure if it would work. Does anyone have experience?...
Next