select c.id, cast(unnest(string_to_array(translate(c.qualification_documents,'{}',''),',')) as INTEGER) as split_value
from
( -- имитация данных таблицы
select id, qualification_documents from communication_sailorkeys
) c
ERROR: function translate(integer[], unknown, unknown) does not exist Подсказка: No function matches the given name and argument types. You might need to add explicit type casts.
def get_data(proxy, url):
try:
response = requests.get(url).text()
for _ in range(n):
pass
if something is not None:
cursor.execute('UPDATE something SET col=0 WHERE col2=2')
except KeyboardInterrupt:
response = requests.get(url).text()
for _ in range(n):
pass
if something is not None:
cursor.execute('UPDATE something SET col=0 WHERE col2=2')
raise KeyboardInterrupt
if __name__ == "__main__":
while True:
get_data()
for host, host_output in output.items():
stdout = list(host_output.stdout)
newdict = {host: [stdout]}
return newdict
class Twits(models.Model):
user = models.ForeignKey(User, on_delete = models.CASCADE)
text = models.CharField(max_length=240)
pub_date = models.DateTimeField(default = timezone.now)
likes = GenericRelation(Like)
def __str__(self):
return self.text
@property
def total_likes(self):
return self.likes.count()
class Person(models.Model):
"""docstring for UserProfile"""
user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete = models.CASCADE)
urlavatar = models.CharField(max_length=500)
descr = models.CharField(max_length=240, blank=True, null=True)
relationships = models.ManyToManyField('self', through='Relationship', related_name='related_to', symmetrical=False)