---
title: "Feidhmeanna bunachar sonraí sonracha PostgreSQL"
version: 6.1
locale: ga
source: https://docs.djangoproject.com/ga/6.1/ref/contrib/postgres/functions/
canonical: https://djangodocs.dev/ga/6.1/ref/contrib/postgres/functions/
---
# Feidhmeanna bunachar sonraí sonracha PostgreSQL

Tá na feidhmeanna seo go léir ar fáil ón modúl `django.contrib.postgres.functions`.

## `Randamuuid`

#### `class RandomUUID`

Tugann leagan 4 UUID ar ais.

Sampla úsáide:

```pycon
>>> from django.contrib.postgres.functions import RandomUUID
>>> Article.objects.update(uuid=RandomUUID())
```

> **Use django.db.models.functions.UUID4 instead.**
>
> [`django.db.models.functions.UUID4`](/ga/6.1/ref/models/database-functions/#django.db.models.functions.UUID4) is a cross-database version of
> this function. `RandomUUID` may be deprecated in the future.

## Idirghníomhaíochtaí Anois \`\`

#### `class TransactionNow`

Tugann sé an dáta agus an t-am ar an bhfreastalaí bunachar sonraí a thosaigh an t-idirbheart reatha. Mura bhfuil tú i idirbheart, cuirfidh sé dáta agus am an ráiteas reatha ar ais. Is comhlánú é seo la:class: Django.db.Models.Functions.Now, a thugann dáta agus am an ráiteas reatha ar ais.

Note that only the outermost call to [`atomic()`](/ga/6.1/topics/db/transactions/#django.db.transaction.atomic)
sets up a transaction and thus sets the time that `TransactionNow()` will
return; nested calls create savepoints which do not affect the transaction
time.

Sampla úsáide:

```pycon
>>> from django.contrib.postgres.functions import TransactionNow
>>> Article.objects.filter(published__lte=TransactionNow())
<QuerySet [<Article: How to Django>]>
```
